-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Vite config:
build: {
emptyOutDir: true,
outDir: './webroot/dist',
manifest: true,
rollupOptions: {
input: {
main: './webroot_src/main.ts',
},
},
},
The green scripts are inserted by the plugin, but the red above come from vite. Vite expects the outDir to be the root which is accessible by apache etc.
So there is no /dist prefix and dynamic modules cannot be loaded.
A solution would be to set outDir to ./webroot. But then, vite will remove all files in webroot if emptyOutDir is true.
Does anyone have an idea how to fix that? If not, emptyOutDir would not work if you have static assets in webroot that don't come from vite.
You would have to delete the /assets folder before building manually here and there (not a big deal though).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
