Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

删除注释如何配置? #43

Open
pangxieju opened this issue Jun 23, 2020 · 2 comments
Open

删除注释如何配置? #43

pangxieju opened this issue Jun 23, 2020 · 2 comments

Comments

@pangxieju
Copy link

vue.config.js 的里删除注释配置对生成的 dll 文件无效,请问 dll 插件如可添加删除注释功能。

@fingerpan
Copy link
Owner

vue.config.js 的里删除注释配置对生成的 dll 文件无效,请问 dll 插件如可添加删除注释功能。

你是如何配置的?

@pangxieju
Copy link
Author

pangxieju commented Jun 24, 2020

vue.config.js的里删除注释配置对生成的dll文件无效,请问dll插件如可添加删除注释功能。

你是如何配置的?

在 vue.config.js 文件里面配置

{
  pluginOptions: {
    dll: {
      entry: ['vue', 'vue-router'],
    },
  },
  configureWebpack: (config) => {
    config.optimization = {
      minimizer: [
        // https://webpack.js.org/plugins/terser-webpack-plugin/
        new TerserPlugin({
          extractComments: false,
          terserOptions: {
            compress: {
              drop_console: true,
              drop_debugger: true,
              pure_funcs: ['console.log'],
            },
          },
          cache: isCache,
        }),
      ],
    };
  }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants