File tree Expand file tree Collapse file tree 6 files changed +89
-0
lines changed
test/manualDisableAsyncOption Expand file tree Collapse file tree 6 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 2828 "test:watch" : " cross-env NODE_ENV=test jest --watch" ,
2929 "test:coverage" : " cross-env NODE_ENV=test jest --collectCoverageFrom=\" src/**/*.js\" --coverage" ,
3030 "test:manual" : " webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js" ,
31+ "test:manualDisableAsync" : " webpack-dev-server test/manualDisableAsyncOption/src/index.js --open --config test/manualDisableAsyncOption/webpack.config.js" ,
3132 "pretest" : " npm run lint" ,
3233 "test" : " cross-env NODE_ENV=test npm run test:coverage" ,
3334 "defaults" : " webpack-defaults"
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6+ < title > mini-css-extract-plugin testcase</ title >
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
8+ < link rel ="stylesheet " type ="text/css " href ="/dist/a.css " />
9+ </ head >
10+ < body >
11+ < script type ="text/javascript " src ="/dist/a.js "> </ script >
12+ < script type ="text/javascript " src ="/dist/b.js "> </ script >
13+ < script type ="text/javascript " src ="/dist/main.js "> </ script >
14+ </ body >
15+ </ html >
Original file line number Diff line number Diff line change 1+ .container {
2+ background : blue;
3+ color : red;
4+ width : 100% ;
5+ height : 20px ;
6+ text-align : center;
7+ }
Original file line number Diff line number Diff line change 1+ .container {
2+ background : purple;
3+ color : green;
4+ width : 100% ;
5+ height : 20px ;
6+ text-align : center;
7+ }
Original file line number Diff line number Diff line change 1+ /* eslint-env browser */
2+
3+ import './a.css' ;
4+ import './b.css' ;
5+
6+ const render = ( ) => {
7+ const div = document . createElement ( 'div' ) ;
8+ div . setAttribute ( 'class' , 'container' ) ;
9+ const text = 'My background color should be blue, and my text should be red!' ;
10+ div . innerHTML = text ;
11+ document . body . appendChild ( div ) ;
12+ } ;
13+
14+ render ( ) ;
Original file line number Diff line number Diff line change 1+ const Self = require ( '../../' ) ;
2+
3+ module . exports = {
4+ mode : 'development' ,
5+ output : {
6+ chunkFilename : '[name].js' ,
7+ publicPath : '/dist/' ,
8+ crossOriginLoading : 'anonymous' ,
9+ } ,
10+ optimization : {
11+ splitChunks : {
12+ cacheGroups : {
13+ default : false ,
14+ a : {
15+ name : 'a' ,
16+ test : / a .c s s / ,
17+ chunks : 'all' ,
18+ enforce : true ,
19+ } ,
20+ b : {
21+ name : 'b' ,
22+ test : / b .c s s / ,
23+ chunks : 'all' ,
24+ enforce : true ,
25+ } ,
26+ } ,
27+ } ,
28+ } ,
29+ module : {
30+ rules : [
31+ {
32+ test : / \. c s s $ / ,
33+ use : [ Self . loader , 'css-loader' ] ,
34+ } ,
35+ ] ,
36+ } ,
37+ plugins : [
38+ new Self ( {
39+ filename : '[name].css' ,
40+ } ) ,
41+ ] ,
42+ devServer : {
43+ contentBase : __dirname ,
44+ } ,
45+ } ;
You can’t perform that action at this time.
0 commit comments