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/template-webpack-plugin.lynxencodeplugin.defaultoptions.md.
这是开发预览网站。请访问正式文档 lynxjs.org

Home > @lynx-js/template-webpack-plugin > LynxEncodePlugin > defaultOptions

LynxEncodePlugin.defaultOptions property

defaultOptions is the default options that the LynxEncodePlugin uses.

Signature:

static defaultOptions: Readonly<Required<LynxEncodePluginOptions>>;

Example

defaultOptions can be used to change part of the option and keep others as the default value.

// webpack.config.js
import { LynxEncodePlugin } from '@lynx-js/template-webpack-plugin'
export default {
  plugins: [
    new LynxEncodePlugin({
      ...LynxEncodePlugin.defaultOptions,
      enableRemoveCSSScope: true,
    }),
  ],
}