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(gatsby): Update mini-css-extract-plugin to fix inc builds issue #33979

Merged
merged 17 commits into from
Dec 14, 2021

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented Nov 15, 2021

Description

Update mini-css-extract-plugin to fix a weird cache/recompilation issue. css-loader also needed to be updated due to webpack-contrib/css-loader#1384 bug (hash was different in client-side/SSR)

Failing test assertion was added in #33982 and this PR should fix this.

Related Issues

Fixes #33450

[ch40612]

@LekoArts LekoArts changed the title wip fix(gatsby): Update mini-css-extract-plugin to fix inc builds issue Nov 15, 2021
@LekoArts LekoArts added the topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) label Nov 15, 2021
@LekoArts LekoArts marked this pull request as ready for review November 15, 2021 14:35
@LekoArts
Copy link
Contributor Author

LekoArts commented Nov 18, 2021

The tests for global styles are failing now because the url() usage has been changed. In https://github.com/webpack-contrib/css-loader/releases/tag/v6.0.0 it says

file-loader and url-loader are deprecated, please migrate on asset modules, since v6 css-loader is generating new URL(...) syntax, it enables by default built-in assets modules, i.e. type: 'asset' for all url()

So in the e2e test the generated HTML is pointing to a different location than what is generated. Right now both at public and public/static font files are generated.

We'd need to further look into https://webpack.js.org/guides/asset-modules/

axfoxtail
axfoxtail previously approved these changes Nov 23, 2021
@pieh pieh merged commit 725dc36 into master Dec 14, 2021
@pieh pieh deleted the mini-css-plugin branch December 14, 2021 19:49
LekoArts added a commit that referenced this pull request Jan 6, 2022
pieh pushed a commit that referenced this pull request Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First incremental build rebuilds all HTML pages
3 participants