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,
    }),
  ],
}