purifycss-webpack
purifycss-webpack copied to clipboard
Only parsing the first required css file
trafficstars
Hello, this is my first issue filling. I hope to do it alright.
So the problem I've found is that when using the PurifyCSSPlugin I only get on the output file the information from the first css file I'm requiring in my main entry js file. If I comment it out the and only use the ExtractTextPlugin, the output has all the info needed. Also, if I comment out the requirement of the first css file in my main entry js file, it includes the information of the second one.
Im currently testing using: webpack: ^3.10.0 extract-text-webpack-plugin: ^3.0.2 purify-css: ^1.2.5 purifycss-webpack: ^0.7.0
webpack.config.js
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: {
loader: 'css-loader',
options: {
sourceMap: true
}
}
`})`
}
],
plugins: [
new ExtractTextPlugin({
filename: 'css/styles.css',
allChunks: true
}),
new PurifyCSSPlugin({
paths: glob.sync(path.join(__dirname, 'src/*.html')),
moduleExtensions: [".html"],
minimize: true,
purifyOptions: {
info: true,
rejected: true
}
})
]
index.js
require("../node_modules/bootstrap/dist/css/bootstrap.css");
require("./css/main.css");
Same problem for me.