请问项目运行时总是出现/sockjs-node/info?t=1473313213585". [WDS] Disconnected!的错误是怎么回事?
webpack.common.js如下
/**
* Created by lxy on 2016/8/24.
*/
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var helpers = require('./helpers');
module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts',
'client': "webpack-dev-server/client?http://localhost:8080"
},
resolve: {
extensions: ['', '.js', '.ts','.html'],
modulesDirectories: [
'node_modules'
]
},
module: {
loaders: [
{
test: /\.ts$/,
loaders: ['ts', 'angular2-template-loader']
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=assets/[name].[hash].[ext]'
},
{
test: /\.css$/,
exclude: helpers.root('src', 'app'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: helpers.root('src', 'app'),
loader: 'raw'
}
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'src/index.html'
})
]
};
package.json scripts start 部分:
"start": "webpack-dev-server --inline --progress --port 8080 --host 0.0.0.0",
仅有的幸福2017-05-15 17:08:32
Add --hot to webpack-dev-server. This option is used to configure updates.
Here are all the configuration items: http://webpack.github.io/docs...