File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
examples/cli/multi-compiler Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ # CLI: Multi Compiler
2
+
3
+ ` webpack-dev-server ` should be able to compile multiple webpack configs.
4
+
5
+ ``` shell
6
+ npm run webpack-dev-server -- --open
7
+ ```
8
+
9
+ ## What Should Happen
10
+
11
+ 1 . The script should open ` http://localhost:8080/ ` in your default browser.
12
+ 2 . You should see the text on the page itself change to read ` Success! ` .
13
+ 3 . In ` app.js ` write code containing a syntax error and save the file.
14
+ 4 . The page should now refresh and show a full screen error overlay, displaying
15
+ the syntax error.
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const target = document . querySelector ( '#target' ) ;
4
+
5
+ target . classList . add ( 'pass' ) ;
6
+ target . innerHTML = 'Success!' ;
7
+
8
+ // This results in an error:
9
+ // if(!window) require("test");
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ // our setup function adds behind-the-scenes bits to the config that all of our
4
+ // examples need
5
+ const { setup } = require ( '../../util' ) ;
6
+
7
+ module . exports = [ setup ( {
8
+ context : __dirname ,
9
+ entry : './app.js'
10
+ } ) ] ;
You can’t perform that action at this time.
0 commit comments