Skip to content

Commit ee3cf00

Browse files
committed
fix: add semicolon to avoid Uncaught TypeError on Webpack v5
See: #560 The compiled javascript pack is generated as follows: ``` ... /******/ // object to store loaded CSS chunks /******/ var installedCssChunks = { /******/ "common": 0 /******/ }/* webpack/runtime/jsonp chunk loading */ /******/ (() => { /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "common": 0 /******/ }; .... ``` A missing semicolon after the closing `}` when defining `installedCssChunks` causes the object `{ "common": 0}` to be incorrectly interpreted as a function
1 parent b146549 commit ee3cf00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class MiniCssExtractPlugin {
251251
Template.indent(
252252
chunk.ids.map((id) => `${JSON.stringify(id)}: 0`).join(',\n')
253253
),
254-
'}',
254+
'};',
255255
]);
256256
}
257257

0 commit comments

Comments
 (0)