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

Only parsing the first required css file #130

@m33toh

Description

@m33toh

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");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions