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

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

LynxTemplatePlugin.defaultOptions property

defaultOptions is the default options that the LynxTemplatePlugin uses.

Signature:

static defaultOptions: Readonly<Required<LynxTemplatePluginOptions>>;

Example

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

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