File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -845,7 +845,12 @@ class MiniCssExtractPlugin {
845
845
846
846
return obj ;
847
847
} ;
848
- // @ts -ignore
848
+
849
+ /**
850
+ * @param {Chunk } chunk chunk
851
+ * @param {ChunkGraph } chunkGraph chunk graph
852
+ * @returns {boolean } true, when the chunk has css
853
+ */
849
854
function chunkHasCss ( chunk , chunkGraph ) {
850
855
// this function replace:
851
856
// const chunkHasCss = require("webpack/lib/css/CssModulesPlugin").chunkHasCss;
@@ -884,13 +889,12 @@ class MiniCssExtractPlugin {
884
889
/** @type {Chunk } */ ( chunk ) ,
885
890
/** @type {Compilation } */ ( this . compilation )
886
891
) ;
887
- const globalObject = runtimeTemplate . globalObject ;
892
+ const { globalObject } = runtimeTemplate ;
888
893
const { linkPreload, linkPrefetch } =
889
894
JsonpChunkLoadingRuntimeModule . getCompilationHooks ( compilation ) ;
890
- const conditionMap = chunkGraph . getChunkConditionMap (
891
- chunk ,
892
- chunkHasCss
893
- ) ;
895
+ const conditionMap = /** @type {ChunkGraph } */ (
896
+ chunkGraph
897
+ ) . getChunkConditionMap ( /** @type {Chunk } */ ( chunk ) , chunkHasCss ) ;
894
898
const hasCssMatcher = compileBooleanMatcher ( conditionMap ) ;
895
899
896
900
const withLoading =
You can’t perform that action at this time.
0 commit comments