-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add semicolon to avoid Uncaught TypeError
on Webpack v5
#561
fix: add semicolon to avoid Uncaught TypeError
on Webpack v5
#561
Conversation
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
Codecov Report
@@ Coverage Diff @@
## master #561 +/- ##
=======================================
Coverage 88.55% 88.55%
=======================================
Files 5 5
Lines 428 428
Branches 96 96
=======================================
Hits 379 379
Misses 47 47
Partials 2 2
Continue to review full report at Codecov.
|
Very strange what CI failed 😕 Need investigate |
Yeah it seems it's failing for This test is also failing on the latest Unfortunately I'm not sure I know enough about the plugin to easily debug this quickly
|
Can you update snapshot? |
@evilebottnawi, @sokra - I added a new commit (bf2de3d) to update the snapshot for the failing test ( Everything passes for me locally now with webpack 5. The CI is still failing for unrelated tests, and it seems to be because of a setup/configuration issue with the test directories. These are probably outside of the scope of this fix, right? Example:
Thanks again! |
Yes, it is outside, I will look at this tomorrow and we can do patch release |
@abhchand I think we need to add tests to avoid future regressions, can you do it? Just simple test (only for webpack@5) |
@evilebottnawi - I'll have to figure out how the tests work, so it might take me a few days. But sure, I'll give it a try. |
Adding 2 tests: * `dependOn` - Checks that `dependOn` feature works * `dependOn-multiple-files-per-entry` - Webpack 5 supports specifying multiple files per entry point in combination with the `dependOn` key Motivated by the issue described in #560
@evilebottnawi - I added 2 tests for the 1.
|
I think we can add |
But i think it is out work, not you, I will merge it as is and fix tests in near future (today) |
WIP on tests, thanks for the PR |
@evilebottnawi - Спасибо за вашу помощь :) |
@abhchand Thanks for using webpack |
This latest build includes a fix required for Webpack5 See: webpack-contrib/mini-css-extract-plugin#561
This latest build includes a fix required for Webpack5 See: webpack-contrib/mini-css-extract-plugin#561
A missing semicolon after the closing
}
when defininginstalledCssChunks
causes the object{ "common": 0}
to beincorrectly interpreted as a function
This PR contains a:
Motivation / Use-Case
fixes #560
The compiled javascript pack is generated by Webpack v5 as follows:
Breaking Changes
n/a
Additional Info