rollup-plugin-postcss
rollup-plugin-postcss copied to clipboard
support Rollup [hash] placeholder
Breaking change
Utilize emitFile({ type: 'asset' }) plugin context utility function to allow extracted file to respect Rollup's assetFileNames name pattern, and thus support unique/cache-busting file naming based on the content of the asset.
Requires users who specify the plugin option, extract: true (explicit string paths are unaffected), to configure Rollup's output.assetFileNames setting (to '[name][extname]'), since this defaults to placing the generated .css/.css.map files under an assets directory relative to output.dir (as well as adding the [hash] placeholder to the file name), which hence doesn't mirror present functionality.
Codecov Report
Merging #226 into master will increase coverage by
0.02%. The diff coverage is100%.
@@ Coverage Diff @@
## master #226 +/- ##
==========================================
+ Coverage 91.69% 91.72% +0.02%
==========================================
Files 9 9
Lines 289 290 +1
Branches 100 98 -2
==========================================
+ Hits 265 266 +1
Misses 24 24
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/index.js | 96.34% <100%> (+0.04%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 06a2771...d37d9da. Read the comment docs.
It would be really great to have hashing behaviour. I'd love to know why it was not progressed to live
+1! Can we add support for this?
I haven't tested the latest code in master, but is this PR still necessary? I see additional usage of emitFile in master now, so perhaps this has already been implemented?
https://github.com/egoist/rollup-plugin-postcss/blob/ceee1bc87d91d6c2692e2f44ae2753fa83a0b535/src/index.js#L244