Any plans to upgrade css-loader to v6.3.0 to support constructable stylesheet? #33604
Unanswered
RubyHue
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Now that
gatsby
is moving to v4, it's a great opportunity to also upgradecss-loader
.css-loader
v6.3.0 has a new featureexportType
option which allows us to export aconstructable stylesheet
.In the browser you can have a component lazy loading some styles like this:
It is possible to customize webpack config in
gatsby-node.js
so that during build you can export css as string then usereact-helmet
to add the stylesheet to html builds.Breaking change from
css-loader v6.0.0
that needs fix:url
andimport
optionsFunction
type was removed in favorObject
type with thefilter
property, i.e. before{ url: () => true }
, now{ url: { filter: () => true } }
and before{ import: () => true }
, now{ import: { filter: () => true } }
Beta Was this translation helpful? Give feedback.
All reactions