I have a clean Sage 10 install.
/wp-content/themes/sage10/resources/scripts/app.js I have a dynamic import
import('./test'). When I run
yarn dev and check localhost:3000, the test.js module imports just fine.
However, when I run
yarn build and check the site. I get the following 404 error:
Uncaught (in promise) ChunkLoadError: Loading chunk 5 failed. (error: http://mytestsite.local/5.396f8b.js)
It looks like the module’s path is defaulting to the root folder, rather than the theme’s public directory. The path should be:
Is there a bud configuration to fix this? I have only changed the proxy value in bud.config.js. Am I missing something else?
Any help would be appreciated, thanks!