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

Handle changes to stats made in webpack 5 #40

Merged
merged 4 commits into from
Mar 4, 2021
Merged

Conversation

MLoughry
Copy link
Collaborator

@MLoughry MLoughry commented Feb 8, 2021

This change primarily addresses two main changes made to the stats JSON in webpack v5:

  • A module can be concatenated to more than one module when building multiple entries, so updated deriveGraph to no longer assume that each module would be unique.
  • stats.namedChunkGroups[*].assets[*] was a string in webpack 4, but is now a { name: string, size: number } in v5. Updated deriveChunkGroupData and its tests to handle this change in a non-breaking way.

I also added a .prettierrc file (as the defaults for the Prettier VSO plugin were causing unwanted changes), and updated tsconfig.json and the engines field in package.json to handle more recent Object methods.

src/api/deriveBundleData/deriveChunkGroupData.ts Outdated Show resolved Hide resolved
src/api/deriveBundleData/deriveGraph.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@smikula smikula merged commit 88e1c1d into master Mar 4, 2021
@smikula smikula deleted the webpack-5-upgrade branch March 4, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants