# ignore-webpack-plugin

# 简介

@esign/plugin-core 配合使用,以实现构建主应用时 忽略 所有插件文件或 指定 插件文件。

# 安装

yarn add @esign/ignore-webpack-plugin -D

# 使用方式

# vue.config.js

const IgnorePlugin = require('@esign/ignore-webpack-plugin')

module.exports = {
  ......
  configureWebpack: {
    plugins: [
      /**
       * 忽略指定插件文件
       * exclude 参数为要排除的文件,类型为 string 或 array
       * 使用场景为构建时扩展点 env 值为 'compile' 时,需配置 exclude 参数
       * new IgnorePlugin({
       *  exclude: ['hello-world-epu']
       * })
       */
      /** 忽略所有插件文件 */
      new IgnorePlugin()
    ]
  }
}

# 配置项

参数 类型 描述
exclude string 或 string[] 要排除的扩展点

说明: exclude的使用场景: 构建项目时扩展点 env 值为 compile 时,需配置 exclude 参数

上次更新: 4/23/2023, 8:17:37 AM