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

Fix build of large css with Webpack #1844

Merged
merged 2 commits into from
Dec 7, 2020

Conversation

DreierF
Copy link
Contributor

@DreierF DreierF commented Dec 6, 2020

Changes

This PR fixes a build failure of the Webpack plugin when processing large chunks of css. This is a regression of what was first brought of in this discussion, has been fixed in PR and has been reintroduced by PR.

The new behavior adds a separate chunk for css just like is is also handled in Gatsby.

While investigating where the fix has been lost I also noticed that there are 6 commits within the last 3 weeks that have been committed to master, but are not on the main branch, which seems to be the new default branch. Would probably be a good idea to merge master into main 😉

Testing

Performed a manual test on a project that suffered from this error.

Docs

Just a bug fix. No docs.

@vercel
Copy link

vercel bot commented Dec 6, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/mfpin7wsd
✅ Preview: https://snowpack-git-webpackfailonlargecss.pikapkg.vercel.app

Copy link
Owner

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix appears to work, +1 conceptually. @mxmul mind taking a look to make sure this doesn't regress anything on your end?

plugins/plugin-webpack/plugin.js Outdated Show resolved Hide resolved
Copy link
Contributor

@mxmul mxmul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to do more fine grained CSS code splitting (and I'm surprised to learn that Gatsby doesn't!), but this looks safe to me. Ship it!

@FredKSchott
Copy link
Owner

LGTM!

@FredKSchott FredKSchott merged commit ac70a4a into FredKSchott:main Dec 7, 2020
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.

3 participants