Home > @lynx-js/css-extract-webpack-plugin > CssExtractRspackPlugin

CssExtractRspackPlugin class

CssExtractRspackPlugin is the CSS extract plugin for Lynx. It works just like the CssExtractRspackPlugin in Web.

Signature:

declare class CssExtractRspackPlugin 

Example

import { CssExtractRspackPlugin } from '@lynx-js/css-extract-webpack-plugin'
export default {
  plugins: [new CssExtractRspackPlugin()],
  module: {
    rules: [
      {
        test: /\.css$/,
        uses: [CssExtractRspackPlugin.loader, 'css-loader'],
      },
    ],
  },
}

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the CssExtractRspackPlugin class

Properties

PropertyModifiersTypeDescription
defaultOptionsstaticReadonly<CssExtractRspackPluginOptions>defaultOptions is the default options that the CssExtractRspackPlugin uses.
loaderstaticstringThe loader to extract CSS.

Methods

MethodModifiersDescription
apply(compiler)The entry point of a webpack plugin.