-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
noCredentials is not propagating through to AbstractXHRObject #356
Comments
👍 For the time being, I have resolved this locally by fixing the version number of two npm packages:
|
until these problems are resolved: * webpack/webpack-dev-server#356 (comment) * socketio/socket.io-client#933 (comment)
@py-in-the-sky I tried your fix, I'm still seeing:
|
I think I just solved it! It works with So my webpack-dev-server config is: var devServerPort = 5584;
var publicPath = webpackConfig.output.publicPath;
webpackMerge(webpackConfig, {
devtool: debug ? 'source-map' : 'eval',
entry: {
main: [
'webpack-dev-server/client?http://0.0.0.0:' + devServerPort,
'webpack/hot/only-dev-server',
],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
devServer: {
port: devServerPort,
headers: {
"Access-Control-Allow-Origin": "*",
},
hot: true,
inline: false,
historyApiFallback: false,
stats: {
colors: true,
},
watchOptions: {
aggregateTimeout: 250,
poll: 50
},
watch: true,
host: '0.0.0.0',
noCredentials: true,
lazy: false, // No watching, compiles on request (cannot be combined with --hot).
quiet: false, // Display nothing to the console
noInfo: true, // Display no info to console (only warnings and errors)
},
output: {
publicPath: 'http://' + wxConfig.server + ':' + devServerPort + publicPath
}
}); By digging through the source I discovered that
I wanted
Testing with webpack 1.12.11 and webpack-dev-server 1.14.1. |
Any update on this? |
I really terrible hack to this is to go to the node_modules |
A PR is welcome. |
I'm closing this issue since nobody seems to have this problem anymore. If you still have, feel free to do a PR or comment here. |
I've got this in my
webpack.config.js
:But I keep getting this error (in Chrome dev tools):
I traced this problem back to
node_modules/webpack-dev-server/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js
. This block here is settingwithCredentials
anyway:Because
opts
isn't coming through at all (it'sundefined
).Can you make the
noCredentials
option flow through, so that we can disable credentials? It's preventing me from using the webpack-dev-server because my app lives at a different domain + port than where dev-server is serving the assets from.The text was updated successfully, but these errors were encountered: