rollup-plugin-postcss icon indicating copy to clipboard operation
rollup-plugin-postcss copied to clipboard

Breaking change: use no-treeshake from rollup

Open wardpeet opened this issue 5 years ago • 2 comments

Uses rollup no-treeshake feature for modules so rollup doesn't try to treeshake and keep it in the bundle info array.

This is a breaking change because rollup needs version 2.21.0 and output has been changed in a few cases. When css-modules is not or css-modules do not have any exports we return an empty export so rollup can omit the file.

Note: This builds upon https://github.com/egoist/rollup-plugin-postcss/pull/295 and thanks to @BPScott to pointing it out and do the initial PR request.

wardpeet avatar Aug 16 '20 18:08 wardpeet

Codecov Report

Merging #308 into master will decrease coverage by 0.35%. The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
- Coverage   92.50%   92.14%   -0.36%     
==========================================
  Files          10       10              
  Lines         320      331      +11     
  Branches      113      115       +2     
==========================================
+ Hits          296      305       +9     
- Misses         23       25       +2     
  Partials        1        1              
Impacted Files Coverage Δ
src/index.js 98.09% <90.00%> (-0.89%) :arrow_down:
src/postcss-loader.js 91.34% <91.66%> (-0.66%) :arrow_down:

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 a13a987...6b76f12. Read the comment docs.

codecov[bot] avatar Aug 16 '20 18:08 codecov[bot]

@wardpeet Whatever happened to this PR? I could really use this, rollup is treeshaking out my scss.

nathanielhunter avatar Mar 19 '21 02:03 nathanielhunter