angular.js - /sockjs-node/info?t=1473313213585". [WDS] Disconnected!
問(wèn)題描述
請(qǐng)問(wèn)項(xiàng)目運(yùn)行時(shí)總是出現(xiàn)/sockjs-node/info?t=1473313213585'. [WDS] Disconnected!的錯(cuò)誤是怎么回事?
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',
![angular.js - /sockjs-node/info?t=1473313213585". [WDS] Disconnected!](http://www.piao2010.com/attached/image/news/202311/1012266b6d.png)
問(wèn)題解答
回答1:webpack-dev-server 加一個(gè) --hot,這個(gè)選項(xiàng)是用來(lái)配置了更新的。這里是所有的配置項(xiàng):http://webpack.github.io/docs...
相關(guān)文章:
1. javascript - 添加一個(gè)tr標(biāo)簽到table標(biāo)簽里,在控制臺(tái)顯示table標(biāo)簽時(shí),有2個(gè)子元素?我想要的是tr標(biāo)簽包含到table標(biāo)簽里面2. 運(yùn)行python程序時(shí)出現(xiàn)“應(yīng)用程序發(fā)生異常”的內(nèi)存錯(cuò)誤?3. css - 移動(dòng)端 盒子內(nèi)加overflow-y:scroll后 字體會(huì)變大4. MySQL中無(wú)法修改字段名的疑問(wèn)5. html5 - 前端面試碰到了一個(gè)緩存數(shù)據(jù)的問(wèn)題,來(lái)論壇上請(qǐng)教一下6. macos - 無(wú)法source activate python277. python - sqlalchemy更新數(shù)據(jù)報(bào)錯(cuò)8. 我在導(dǎo)入模板資源時(shí)遇到無(wú)法顯示的問(wèn)題,請(qǐng)老師解答下9. html - 網(wǎng)頁(yè)的a標(biāo)簽到底要不要寫(xiě)上域名?10. PHPExcel表格導(dǎo)入數(shù)據(jù)庫(kù)怎么導(dǎo)入

網(wǎng)公網(wǎng)安備