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',
問(wèn)題解答
回答1:webpack-dev-server 加一個(gè) --hot,這個(gè)選項(xiàng)是用來(lái)配置了更新的。這里是所有的配置項(xiàng):http://webpack.github.io/docs...
相關(guān)文章:
1. mysql - ubuntu開(kāi)啟3306端口失敗,有什么辦法可以解決?2. php傳對(duì)應(yīng)的id值為什么傳不了啊有木有大神會(huì)的看我下方截圖3. extra沒(méi)有加載出來(lái)4. javascript - 微信網(wǎng)頁(yè)開(kāi)發(fā)從菜單進(jìn)入頁(yè)面后,按返回鍵沒(méi)有關(guān)閉瀏覽器而是刷新當(dāng)前頁(yè)面,求解決?5. mysql - C#連接數(shù)據(jù)庫(kù)時(shí)一直這一句出問(wèn)題int i = cmd.ExecuteNonQuery();6. mysql日期類型默認(rèn)值’0000-00-00’ 報(bào)錯(cuò)7. 求救一下,用新版的phpstudy,數(shù)據(jù)庫(kù)過(guò)段時(shí)間會(huì)消失是什么情況?8. mysql replace 死鎖9. windows - asp.net連接上mysql之后如何調(diào)用?比如下面的登錄驗(yàn)證功能怎么實(shí)現(xiàn)10. android - 安卓做前端,PHP做后臺(tái)服務(wù)器 有什么需要注意的?
