Skip to content

Commit cf75ef2

Browse files
committed
fix
1 parent 1e22e41 commit cf75ef2

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

Client/dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44
var path = require('path')
55
var webpack = require('webpack');
6-
var publicPath = 'http://localhost:10001/html/dist';
7-
var hotMiddlewareScript = 'webpack-hot-middleware/client?http://localhost:10001';
6+
var publicPath = 'http://localhost:10000/html/dist';
7+
var hotMiddlewareScript = 'webpack-hot-middleware/client?http://localhost:10000';
88
module.exports = {
99
entry: {
1010
vendor:["vue","vuex",path.join(__dirname,"./web/common/js/common.js"),path.join(__dirname,"./web/common/js/net"),path.join(__dirname,"./web/common/js/local"),hotMiddlewareScript,'webpack/hot/only-dev-server'],

Server/app.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ var async=require("asyncawait/async");
99
var await=require("asyncawait/await");
1010
var util=require("./util/util");
1111
var app = express();
12-
// var webpack = require('../Client/node_modules/webpack'),
13-
// webpackDevMiddleware = require('../Client/node_modules/webpack-dev-middleware'),
14-
// webpackHotMiddleware = require('../Client/node_modules/webpack-hot-middleware'),
15-
// webpackDevConfig = require('../Client/dev');
16-
// var compiler = webpack(webpackDevConfig);
17-
// app.use(webpackDevMiddleware(compiler, {
18-
//
19-
// // public path should be the same with webpack config
20-
// publicPath: webpackDevConfig.output.publicPath,
21-
// noInfo: true,
22-
// stats: {
23-
// colors: true,
24-
// chunks: false
25-
// }
26-
// }));
27-
// app.use(webpackHotMiddleware(compiler));
12+
var webpack = require('../Client/node_modules/webpack'),
13+
webpackDevMiddleware = require('../Client/node_modules/webpack-dev-middleware'),
14+
webpackHotMiddleware = require('../Client/node_modules/webpack-hot-middleware'),
15+
webpackDevConfig = require('../Client/dev');
16+
var compiler = webpack(webpackDevConfig);
17+
app.use(webpackDevMiddleware(compiler, {
18+
19+
// public path should be the same with webpack config
20+
publicPath: webpackDevConfig.output.publicPath,
21+
noInfo: true,
22+
stats: {
23+
colors: true,
24+
chunks: false
25+
}
26+
}));
27+
app.use(webpackHotMiddleware(compiler));
2828
(async (function () {
2929
await (util.init());
3030
var checkUser=require("./routes/checkUser");

0 commit comments

Comments
 (0)