fix: update Vite config in JS and TS example apps [EXT-6273] #9570
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
We updated the JS and TS apps to use Vite instead of CRA in this PR: #9516. This is a follow up PR to fix a few items in these examples; fixing a bug with how these templates work with the function templates and updating some dependencies.
Approach
Here's a summary of the updates:
./build
directory, but these examples were set to./dist
for the build directory. In order to accommodate the functions templates, we are changing the build directory to./build
for these TS and JS templatesnpm start
script in addition tonpm dev
since theREADME
andindex.html
files mention runningnpm start
to get started with the template3000
, since this is the default used by App Scripts when creating an app definitionvite.config
files to import the ESM build of Vite and remove a warning (see more here)Testing steps
I tested this locally within this repo and also with the CCA by pointing to this branch. I tested this with the TS and JS base templates and also the function templates.
Breaking Changes
Dependencies and/or References
Deployment