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
{{ message }}
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.
I'm using script-loader to load some legacy scripts into my app. Everything works fine when I build with webpack, but when I build with webpack-dev-server instead (to enable hot reloading of other, non-legacy scripts in my project), all of my bundles that use script-loader throw an error in the browser;
[Script Loader] ReferenceError: require is not defined
...
at Object../node_modules/webpack-dev-server/client/index.js?http://localhost:8080 (myScriptLoaderBundle.js:338)
Oddly, the legacy scripts seem to still be loading in the browser, and the hot reloading of other resources works. But I'm trying to figure out what causes the error, and see if there's anything I can do to avoid it. I thought it might be related to liady/webpack-node-externals#17 but it doesn't look like script-loader uses webpack-node-externals.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using
script-loader
to load some legacy scripts into my app. Everything works fine when I build withwebpack
, but when I build withwebpack-dev-server
instead (to enable hot reloading of other, non-legacy scripts in my project), all of my bundles that usescript-loader
throw an error in the browser;Oddly, the legacy scripts seem to still be loading in the browser, and the hot reloading of other resources works. But I'm trying to figure out what causes the error, and see if there's anything I can do to avoid it. I thought it might be related to liady/webpack-node-externals#17 but it doesn't look like
script-loader
useswebpack-node-externals
.The text was updated successfully, but these errors were encountered: