webpack-contrib / purifycss-webpack

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

CSS + SCSS configuration #54

Closed dhoomm closed 7 years ago

dhoomm commented 8 years ago

I load both .css and .scss as

{ test: /\.scss$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader"), include: paths, }, { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader"), include: paths }, ]

Now when i apply PurifyCss plugin, it does not include any style from any of .scss files. (works as expected for .css files). When i remove purify plugin, styles from .scss files are loaded.

Kikobeats commented 7 years ago

check #55

dmackerman commented 7 years ago

You'll need to configure the resolveExtensions config.

    new PurifyCSSPlugin({
      basePath: path.join(__dirname, 'portal', 'js'),
      resolveExtensions: ['.html', '.js'],
      paths: [
        'app/**/*.js',
        'tpl/**/*.html',
      ],
    }),
bebraw commented 7 years ago

Closing in favor of #55.