For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/css-extract-webpack-plugin.cssextractrspackplugin.md.
这是开发预览网站。请访问正式文档 lynxjs.org

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

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the CssExtractRspackPlugin class

Properties

Property

Modifiers

Type

Description

defaultOptions

static

Readonly<CssExtractRspackPluginOptions & Pick<Required<CssExtractRspackPluginOptions>, 'cssPlugins'>>

defaultOptions is the default options that the CssExtractRspackPlugin uses.

loader

static

string

The loader to extract CSS.

Methods

Method

Modifiers

Description

apply(compiler)

The entry point of a webpack plugin.