Skip to content
This repository was archived by the owner on Dec 25, 2018. It is now read-only.

Only parsing the first required css file #130

Open
m33toh opened this issue Feb 15, 2018 · 1 comment
Open

Only parsing the first required css file #130

m33toh opened this issue Feb 15, 2018 · 1 comment

Comments

@m33toh
Copy link

m33toh commented Feb 15, 2018

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");
@garygreen
Copy link

Same problem for me.

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

2 participants