File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -845,7 +845,12 @@ class MiniCssExtractPlugin {
845845
846846 return obj ;
847847 } ;
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+ */
849854 function chunkHasCss ( chunk , chunkGraph ) {
850855 // this function replace:
851856 // const chunkHasCss = require("webpack/lib/css/CssModulesPlugin").chunkHasCss;
@@ -884,13 +889,12 @@ class MiniCssExtractPlugin {
884889 /** @type {Chunk } */ ( chunk ) ,
885890 /** @type {Compilation } */ ( this . compilation )
886891 ) ;
887- const globalObject = runtimeTemplate . globalObject ;
892+ const { globalObject } = runtimeTemplate ;
888893 const { linkPreload, linkPrefetch } =
889894 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 ) ;
894898 const hasCssMatcher = compileBooleanMatcher ( conditionMap ) ;
895899
896900 const withLoading =
You can’t perform that action at this time.
0 commit comments