-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
There is an error when I use webpack-dev-server;
webpack: 2.2.0-rc.1
webpack-dev-server: 2.2.0-rc.0
node: 6.6.0
ERROR in ./~/debug/src/node.js
Module not found: Error: Can't resolve 'net' in '/Users/gaopeng/work/ykpm/node_modules/debug/src'
@ ./~/debug/src/node.js 186:16-30
@ ./~/debug/src/index.js
@ ./~/sockjs-client/lib/main.js
@ ./~/sockjs-client/lib/entry.js
@ (webpack)-dev-server/client/socket.js
@ (webpack)-dev-server/client?http://local.youku.com:3333/
@ multi js/lib
webpackConfig
{
target: 'web',
context: '/Users/gaopeng/work/ykpm',
entry: {
'js/play/live': [
'webpack-dev-server/client?http://local.youku.com:3333/',
'webpack/hot/dev-server',
'js/play/live.js'
]
},
output: {
path: '/',
publicPath: '/',
filename: '[name].js',
pathinfo: false,
chunkFilename: '[name].js',
},
module: {
rules: [{
test: /.js?$/,
exclude: /node_modules/,
use: [
{ loader: 'babel-loader' }
]
}]
},
resolve: {
modules: [ '/Users/gaopeng/work/ykpm/src', 'node_modules' ],
extensions: [ '.js', '.json' ]
},
plugins:[new HotModuleReplacementPlugin()]
}
devServerConfig
{
contentBase: './static/',
https: false,
host: 'local.yk.com',
port: 3333,
hot: true,
inline: true,
stats: { colors: true }
}
Metadata
Metadata
Assignees
Labels
No labels