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

feat: Support Webpack 5 #22

Merged
merged 17 commits into from
Aug 23, 2020
Merged

feat: Support Webpack 5 #22

merged 17 commits into from
Aug 23, 2020

Conversation

privatenumber
Copy link
Owner

@privatenumber privatenumber commented Aug 15, 2020

Original PR: #21

airhorns and others added 7 commits August 15, 2020 11:59
…works on both Webpack 4 and Webpack 5

The Sources returned in the stats.compilation on Webpack 5 don't support reading their contents. So, let's just read the written output, which is a slightly more thorough test anyways. The snapshots didn't need to be updated so I think this is working well.
Uses the new processAssets compiler hook to avoid deprecation warnings and undefined methods.
@privatenumber
Copy link
Owner Author

@airhorns

I'm not too familiar with Webpack 5 yet, but assuming you are or that you have projects that use it.

I compared with how terser-webpack-plugin works, and I saw they add a few other things like the hash update and stats printer.

Do you know if they're necessary?

@airhorns
Copy link
Contributor

👍 thanks for running with the PR! I honestly am a bit of a webpack amateur so I'm not really sure, but as best I understand it, we should do both those things too! Good idea to check.

The hash update makes a lot of sense to me to ensure CDN cache busting and whatnot when the esbuild options change, and the stats printer seems like a nice to have for operators.

@privatenumber privatenumber merged commit c651c4f into develop Aug 23, 2020
@privatenumber privatenumber deleted the webpack-5 branch August 23, 2020 22:19
@github-actions
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants