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.

Support for React (typescript) with inline CSS, is this possible? #133

@sandrosimas

Description

@sandrosimas

I have a React project (typescript) that bundles to a single JS file including everything. PurifyCSS webpack plugin is not working as expected.
The following is the relevant code of my Webpack config:

{
  test: /\.less$/,
  use: [
    'style-loader',
    {
      loader: 'css-loader',
      options: {
        minimize: env === 'production',
      },
    },
    'less-loader',
  ],
  include: helpers.root('/src/assets/styles'),
}
new PurifyCSSPlugin({
  paths: glob.sync(`${helpers.root('/src')}/**/*`),
  styleExtensions: ['.js', '.css', '.less'],
  moduleExtensions: ['.js'],
  verbose: true,
})

This project doesn't have HTML files, only Typescript and Less files.
How to use PurifyCSS in this case? This only works using ExtractTextPlugin?

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