-
-
Notifications
You must be signed in to change notification settings - Fork 606
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 export stylesheet #1368
Merged
Merged
Feat export stylesheet #1368
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1368 +/- ##
==========================================
+ Coverage 98.48% 98.51% +0.02%
==========================================
Files 12 12
Lines 1058 1074 +16
Branches 361 371 +10
==========================================
+ Hits 1042 1058 +16
Misses 13 13
Partials 3 3
Continue to review full report at Codecov.
|
This was referenced Sep 13, 2021
Merged
854a8e6
to
e995878
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a:
Motivation / Use-Case
webpack/webpack#14063
Example usage:
Breaking Changes
No
Additional Info
Here some questions/notes:
@import
? We can do it (because we bundle), but chrome doesn't support yet, let's keep them as is and emit an errorexportType: 'css-style-sheet'
will enablemodules.namedExport: true
by default, otherwise we need modifyCSSStyleSheet
interface, it is bad, so we emit errorFound artifacts in render for emoji (maybe bug in chrome, I will investigate)2
point, CSS modules andexportType: 'css-style-sheet'
can be used only for ECMA modules, without CSS modules you can use commonjs format (i.e.esModule: false
), but I recommend migrate onesModule
(true
by default)document.adoptedStyleSheets
, related Progress on Hot Module Replacement support? lit/lit#2007 (more links inside)mini-css-extract-plugin
requires more work, we will improve this in near futureexportType: 'css-steel-sheet'
you don't needstyle-loader
anymoreMigration usage:
Example: https://web.dev/css-module-scripts/
Additional: https://developers.google.com/web/updates/2019/02/constructable-stylesheets