-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
docs(README): add extract-loader example #518
docs(README): add extract-loader example #518
Conversation
Codecov Report
@@ Coverage Diff @@
## master #518 +/- ##
======================================
Coverage 98.6% 98.6%
======================================
Files 10 10
Lines 359 359
Branches 81 81
======================================
Hits 354 354
Misses 5 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mareksuscak This is eventually is better placed in Examples #extract ? But it also has connections to toString()
and Angular usage, so not 💯 where to place it at best tbh 😛
README.md
Outdated
@@ -73,6 +73,10 @@ console.log(css); // {String} | |||
|
|||
If there are SourceMaps, they will also be included in the result string. | |||
|
|||
If, for one reason or another, you need to extract CSS as a | |||
plain string resource (i.e. not wrapped in a JS module) you | |||
might want to check out the [extract-loader](https://github.com/peerigon/extract-loader). It's useful when you, for instance, need to post-process the CSS as a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\n
after the extract-loader
link aswell for consistency? [link].\n It ....
post-process
=> post process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An small setup example would be appreciated aswell :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool will do, thanks for reviewing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mareksuscak Thx
Recently needed this and I think it’s worth documenting for other folks. Took me a few days to figure out.
The difference between to-string-loader and extract-loader is that former wraps the CSS in a JS module while latter executes the css-loader’s output at compile time and passes that to the next loader in the chain. Came in handy when we needed some further post processing.