webpack-contrib / purifycss-webpack

UNMAINTAINED, use https://github.com/FullHuman/purgecss-webpack-plugin
MIT License
772 stars 37 forks source link

Without the ExtractTextPugin? #101

Open mehdi-cit opened 7 years ago

mehdi-cit commented 7 years ago

Hello! Its's all in the question, I'd like to use the purifycss for generating the css and placing it in the html file not on a separate .css file! Did not find an example of doing that with purifycss-webpack. Is it possible at all? Thx in advance

bebraw commented 7 years ago

I haven't tried that. How do you generate the html files?

mehdi-cit commented 7 years ago

Hello bebraw, In the "entry point" app.js or main.js i do require/import the css file const css = require('../css/app.css'); Obviously in webpack.config, inside module.rules I do add the rule: { test: /\.css$/, use:["style-loader","css-loader"] } In the same webpack.config file I add under resolve extensions: ['css', '.jsx', '.js'],

The above configuration would insert the app.css file contents in the output file (index.html) within a