For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/packages/css-extract-webpack-plugin/classes/CssExtractRspackPlugin.md.
Lynx
  • English
  • Class: CssExtractRspackPlugin

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

    Example

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

    Constructors

    Constructor

    new CssExtractRspackPlugin(options?: CssExtractRspackPluginOptions): CssExtractRspackPlugin

    Parameters

    ParameterType
    options?CssExtractRspackPluginOptions

    Returns

    CssExtractRspackPlugin

    Properties

    defaultOptions

    static defaultOptions: Readonly<CssExtractRspackPluginOptions & Pick<Required<CssExtractRspackPluginOptions>, "cssPlugins">>

    defaultOptions is the default options that the CssExtractRspackPlugin uses.


    loader

    static loader: string

    The loader to extract CSS.

    Remarks

    It should be used with the 'css-loader'.

    Example

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

    Methods

    apply()

    apply(compiler: Compiler): void

    The entry point of a webpack plugin.

    Parameters

    ParameterTypeDescription
    compilerCompilerthe webpack compiler

    Returns

    void

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.