File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,24 +8,29 @@ const common = require("./webpack.common.js");
88module . exports = merge ( common , {
99 mode : "development" ,
1010 watch : true ,
11+ // The dev server uses both contentBase and publicPath. The contentBase is
12+ // used to server the built docs, and publicPath is the bundle path for live
13+ // reloading. The publicPath intercepts requests to the static assets in
14+ // _static/. Opening http://localhost:1919 is everything you need for
15+ // development.
1116 devServer : {
12- contentBase : path . join ( __dirname , "docs/build/html" ) ,
13- watchContentBase : true ,
14- compress : false ,
17+ contentBase : "docs/build/html" ,
1518 port : 1919 ,
19+ open : false ,
1620 hot : false ,
1721 liveReload : true ,
18- publicPath : "/_static/"
22+ publicPath : "/_static/" ,
23+ disableHostCheck : true ,
24+ headers : {
25+ "Access-Control-Allow-Origin" : "*"
26+ }
1927 } ,
2028 plugins : [
2129 new WatchPlugin ( {
2230 files : [ "./docs/**/*.rst" , "./docs/**/*.py" ]
2331 } ) ,
2432 new ShellPlugin ( {
25- onBuildEnd : [ "make -C docs clean html" ] ,
26- // dev=false here to force every build to trigger make, the default is
27- // first build only.
28- dev : false
33+ onBuildStart : [ "make -C docs clean html" ] ,
2934 } )
3035 ]
3136} ) ;
You can’t perform that action at this time.
0 commit comments