-
Notifications
You must be signed in to change notification settings - Fork 416
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
Fixes for webpack 5 support (backward compatible) #472
Conversation
* Uses `modulesIterable` instead of `forEachModule` (already deprecated in version 4) * Iterate over chunks with `for ... of`` because stats.compilation.chunks is a `Set`
@serverless-heaven/serverless-webpack-contributors Can anyone of you confirm, that this PR continues to work with old webpack versions? |
@HyperBrain just tested it on my projects using Webpack v4.x, all seems to be working fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code all looks good, getting a few lint errors on the branch. Aside from that, LGTM 👍
@hassankhan Hmmm. |
@neilime Travis now works again - and stopped at the linter issues. Could you please address the issues? |
@HyperBrain, it's done. |
Hi @neilime, thanks for fixing the lint issues. Unfortunately, it seems test coverage has decreased (as noted by the failed |
@hassankhan, it's done. |
You're right @hassankhan, I have change the code |
Released with 5.3.0 |
Fixes for webpack 5 support (backward compatible)
What did you implement:
Webpack 5 removes deprecated functions, and add some minor changes that broke up this plugin
How did you implement it:
modulesIterable
instead offorEachModule
(already deprecated in version 4)for ... of
because stats.compilation.chunks is aSet
nowHow can we verify it:
Install webpack 5
run
sls package
An error occured : Cannot read property 'forEachModule' of undefined
Todos:
Is this ready for review?: YES
Is it a breaking change?: NO