File tree Expand file tree Collapse file tree 6 files changed +33
-2
lines changed
test/cases/prefetch-preload-hmr Expand file tree Collapse file tree 6 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -1123,7 +1123,7 @@ class MiniCssExtractPlugin {
11231123 ] )
11241124 : "// no hmr" ,
11251125 "" ,
1126- withPrefetch && hasCssMatcher !== false
1126+ withPrefetch && withLoading && hasCssMatcher !== false
11271127 ? `${
11281128 RuntimeGlobals . prefetchChunkHandlers
11291129 } .miniCss = ${ runtimeTemplate . basicFunction ( "chunkId" , [
@@ -1159,7 +1159,7 @@ class MiniCssExtractPlugin {
11591159 ] ) } ;`
11601160 : "// no prefetching" ,
11611161 "" ,
1162- withPreload && hasCssMatcher !== false
1162+ withPreload && withLoading && hasCssMatcher !== false
11631163 ? `${
11641164 RuntimeGlobals . preloadChunkHandlers
11651165 } .miniCss = ${ runtimeTemplate . basicFunction ( "chunkId" , [
Original file line number Diff line number Diff line change 1+ .a {
2+ color : red;
3+ }
Original file line number Diff line number Diff line change 1+ .a {
2+ color : red;
3+ }
4+
Original file line number Diff line number Diff line change 1+ import "./a.css" ;
2+
3+ import ( /* webpackPrefetch: true */ "./b" ) ;
Original file line number Diff line number Diff line change 1+ import webpack from "webpack" ;
2+
3+ import Self from "../../../src" ;
4+
5+ module . exports = {
6+ entry : "./index.js" ,
7+ module : {
8+ rules : [
9+ {
10+ test : / \. c s s $ / ,
11+ use : [ Self . loader , "css-loader" ] ,
12+ } ,
13+ ] ,
14+ } ,
15+ plugins : [
16+ new Self ( {
17+ filename : "[name].css" ,
18+ } ) ,
19+ new webpack . HotModuleReplacementPlugin ( ) ,
20+ ] ,
21+ } ;
You can’t perform that action at this time.
0 commit comments