You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
How the init-cart.css comes into the play?
The ./webroot_src/main.ts imports something what imports the init-cart.css ? Where the init-cart.css is located ?
Vite config:
Generated html:
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 inwebroot
ifemptyOutDir
istrue
.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).The text was updated successfully, but these errors were encountered: