Skip to content

Add documentation in README.md about how to extract all CSS in one file #60

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

Merged
merged 1 commit into from
Mar 27, 2018
Merged

Add documentation in README.md about how to extract all CSS in one file #60

merged 1 commit into from
Mar 27, 2018

Conversation

Pierre-Do
Copy link
Contributor

@Pierre-Do Pierre-Do commented Mar 27, 2018

Following discussions on the issues, this PR aims at documenting the common use-case of extracting all CSS in one file, similar to what https://github.com/webpack-contrib/extract-text-webpack-plugin does.

Tested in a small project there: https://github.com/Akkenar/CSS-Single-File-Example

@jsf-clabot
Copy link

jsf-clabot commented Mar 27, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Mar 27, 2018

Codecov Report

Merging #60 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff          @@
##           master   #60   +/-   ##
====================================
  Coverage       0%    0%           
====================================
  Files           3     3           
  Lines         157   157           
  Branches       32    32           
====================================
  Misses        125   125           
  Partials       32    32

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2456895...713226f. Read the comment docs.

},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css",
Copy link
Member

Choose a reason for hiding this comment

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

Can we add [contenthash] template to avoid problem with cache who use this configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, [hash] could also help with the cache, or the hash: true option on HtmlWebpackPlugin if you're using it. I guess it depends on your project setup.

Not quite sure this documentation section is about cache burst though, hence not adding it in the example configuration.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Looks good thanks!

@alexander-akait alexander-akait merged commit 9b1bd63 into webpack-contrib:master Mar 27, 2018
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.

5 participants