Skip to content
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

Readable JS assets Plugin: Fix webpack 5 support #33785

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

@walbo
Copy link
Contributor

@walbo walbo commented Jul 30, 2021

Description

In webpack v5 Compilation.chunks and Chunk.files changed from arrays to sets. See https://webpack.js.org/blog/2020-10-10-webpack-5-release/#arrays-to-sets

Support both v4 and v5 by making sure we work with arrays (converting the set to array for v5) when generating the files list.

How has this been tested?

Tested the plugin both in webpack v4 and v5.

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
In webpack v5 `Compilation.chunks` and `Chunk.files` changed from arrays to sets. See https://webpack.js.org/blog/2020-10-10-webpack-5-release/#arrays-to-sets

Support both v4 and v5 by making sure we work with arrays (converting the set to array for v5) when generating the files list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant