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
In this usage, the publicPath property isn't defined in the webpack file but instead in a global variable read at runtime, but loadable seems to expect a hard-coded public path that gets copied into loadable-stats.json. So when the "on the fly" method is used, the public path that loadable uses ends up empty and the files aren't referenced properly.
To Reproduce
Steps to reproduce the behavior:
Follow Webpack's instructions to use the "on the fly" public path definition, and do not include publicPath as an option in the webpack config file: https://webpack.js.org/guides/public-path/
In our case we include a fully qualified CDN URL and a version, both pulled from environment variables only available at runtime:
🐛 Bug Report
When using Webpack's "on the fly" definition of the public path, the loadable paths don't match.
https://webpack.js.org/guides/public-path/
In this usage, the
publicPath
property isn't defined in the webpack file but instead in a global variable read at runtime, but loadable seems to expect a hard-coded public path that gets copied intoloadable-stats.json
. So when the "on the fly" method is used, the public path that loadable uses ends up empty and the files aren't referenced properly.To Reproduce
Steps to reproduce the behavior:
Follow Webpack's instructions to use the "on the fly" public path definition, and do not include
publicPath
as an option in the webpack config file: https://webpack.js.org/guides/public-path/In our case we include a fully qualified CDN URL and a version, both pulled from environment variables only available at runtime:
After this, using one of the methods like
extractor.getScriptTags();
outputs something like this:Expected behavior
With the webpack public path configuration as outlined above, we'd expect the script tags to be generated as:
Env info
The text was updated successfully, but these errors were encountered: