File tree Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1
1
var config = require ( './webpack.base.conf' )
2
+ var HtmlWebpackPlugin = require ( 'html-webpack-plugin' )
2
3
4
+ // eval-source-map is faster for development
3
5
config . devtool = 'eval-source-map'
4
6
5
7
config . devServer = {
8
+ // allow access over local network
6
9
host : '0.0.0.0' ,
10
+ // enable HTML5 history routing
7
11
historyApiFallback : true ,
8
- noInfo : true
12
+ // suppress useless text
13
+ noInfo : true ,
9
14
}
10
15
16
+ // necessary for the html plugin to work properly
17
+ // when serving the html from in-memory
18
+ config . output . publicPath = '/'
19
+
20
+ config . plugins = ( config . plugins || [ ] ) . concat ( [
21
+ // generate HTML on the fly
22
+ new HtmlWebpackPlugin ( {
23
+ filename : 'index.html' ,
24
+ template : 'src/index.html'
25
+ } )
26
+ ] )
27
+
11
28
module . exports = config
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ config.plugins = (config.plugins || []).concat([
50
50
// see https://github.com/ampedandwired/html-webpack-plugin
51
51
new HtmlWebpackPlugin ( {
52
52
filename : '../index.html' ,
53
- template : 'build /index.template .html'
53
+ template : 'src /index.html'
54
54
} )
55
55
] )
56
56
Load Diff This file was deleted.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments