Skip to content

Commit 1578e54

Browse files
committed
根据webpack2参数的调整,修改devServer参数
1 parent 9562c6e commit 1578e54

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

webpack-config/vendor/devServer.config.js renamed to webpack-config/devServer.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
contentBase: './build/',
33
host: 'localhost',
4-
port: 8080, // 默认8080
4+
port: 8081, // 默认8080
55
inline: true, // 可以监控js变化
66
hot: true, // 热启动
77
compress: true,

webpack-config/plugins.dev.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pluginsConfig.push(new webpack.LoaderOptionsPlugin({
99
options: {
1010
postcss: require('./vendor/postcss.config.js'),
1111
eslint: require('./vendor/eslint.config.js'),
12-
devServer: require('./vendor/devServer.config.js'),
1312
},
1413
}));
1514

webpack.dev.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ module.exports = {
1212
plugins: require('./webpack-config/plugins.dev.config.js'),
1313

1414
externals: require('./webpack-config/externals.config.js'),
15+
16+
devServer: require('./webpack-config/devServer.config.js'),
1517
};

0 commit comments

Comments
 (0)