Another update here!
@slowrush Yeap, you were right here:
I did unsecure it since the second option didn’t work for me either.
My setup for dynamic js is inspired by this.
So, I have a publicPath.js
file inside scripts
folder which has this line:
__webpack_public_path__ = ASSET_PATH
I import this file in the main entry app.js
and that’s what made dynamic imports work (in staging and production at least).
I removed this import declaration and now the JS files are working correctly on the dev server.
So, it means that I need to remove this line working locally, but don’t forget it to push it, because it would break the scripts on production.
Still, I can’t see the SVGs because they are from the proxy link eg: http://local.test
Security Error: Content at http://localhost:55871/ may not load data from http://local.test/app/themes/local-theme/public/spritesheet.svg.
I have used @asset
to show the SVGs files. Also, the path is wrong.
@slowrush Out of curiosity, can you share what is your setup for Bud and JS that you use to load components dynamically?
I am using Bud 5.