Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Post Processing final extract #167

Closed
nhavar opened this issue Mar 21, 2016 · 4 comments
Closed

Post Processing final extract #167

nhavar opened this issue Mar 21, 2016 · 4 comments

Comments

@nhavar
Copy link

nhavar commented Mar 21, 2016

I'm trying unsuccessfully so far to find an example of how to do post processing on the final output of ExtractTextPlugin. After I run webpack ExtractTextPlugin successfully merges all of the CSS into a main.css, but there's still cleanup required (like merging/removing dupes). But I haven't seen any examples of how to achieve this. Piping to !postcss just seems to run those plugins on the individual chunks and not the whole. Has anyone identified a solution for manipulating the output file?

@Grafikart
Copy link

Got the same problem with mqpacker (to merge media queries)
At the moment the only solution is to use postcss outside of webpack after the build succeed

@kisenka
Copy link

kisenka commented Oct 27, 2016

@nhavar @Grafikart you can extend extract-text-webpack-plugin and write you own. Take look at ExtractSVGPlugin which postprocess extracted chunk with wrapping it with <svg> tags. Hope that helps.

@kisenka
Copy link

kisenka commented Oct 27, 2016

Related issue #161

@bebraw
Copy link
Contributor

bebraw commented Jan 28, 2017

I do this at purifycss-webpack. Please see the plugin for the approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants