WIP add vite support for central vite.config.js #1682
Merged
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.
WIP
This PR allows for the main vite.config.js to load paths from the base application as well as from modules. The idea is to have a single place to load all the css and js files into vite.
This is OPT in, the default setup that now exists allows you to load vite into a module. That will remain. This is to optionally load all assets globally.
The main vite.config.js will need to be updated to use a new
vite-module-loader.js
file. This needs to be published by running:This created a file called
vite-module-loader.js
inside the project root.Now
vite.config.js
will combine all paths from modules as well as those defined in this file.Modules
vite.config.js
should be updated to contain only the assets:Then in the layout file to load all assets use: