Skip to content

Commit 304bdbb

Browse files
luozhang002binghaiwang
authored andcommitted
fix: modify config to support ip visit about example (#486)
1 parent 1c7616d commit 304bdbb

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

example/config/webpack.dev.conf.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const webpack = require('webpack')
55
const HtmlWebpackPluginConfig = {
66
filename: 'index.html',
77
template: './template/index.html',
8-
inject:'body',
8+
inject: 'body',
99
}
1010

1111
module.exports = {
1212
context: path.resolve(__dirname,'../src'),
1313
entry: './main',
1414
output:{
15-
path:path.resolve(__dirname,'../dist'),
15+
path: path.resolve(__dirname,'../dist'),
1616
filename: './[hash]app.js',
1717
hashDigestLength: 8
1818
},
@@ -46,11 +46,12 @@ module.exports = {
4646
],
4747
devServer: {
4848
contentBase: path.resolve(__dirname, "../dist"),
49-
port: 3000,
49+
port: 3000,
50+
host: '0.0.0.0',
5051
open: true, // open browser auto
51-
index:'index.html', // like HtmlWebpackPlugin
52-
inline:true, // default:true
53-
hot:false,
54-
compress:true // compress
52+
index: 'index.html', // like HtmlWebpackPlugin
53+
inline: true, // default:true
54+
hot: false,
55+
compress: true // compress
5556
}
5657
}

0 commit comments

Comments
 (0)