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