VUE-CLI repeat Packaging dependency problem

how do I change the direction of a WEBPACK package?

A project of mine introduces a package, and then the plug-in for this project (pointed to through GITLAB) also depends on that package

then causes the package to be packaged twice

I remember reading an article that can force all packaging files to point to the same package to avoid repeated packaging

how to configure it, it"s VUE-CLI3 scaffolding

Jul.05,2022

configure

      splitChunks: {
        chunks: 'all',
     }

create a new vue.config.js under the root of the project (be sure to call it this name)

module.exports = {
  configureWebpack: () => {
      result = {
        output: {
          filename: path.posix.join(assetsDir, 'js/[name].js?[chunkhash]'),
          chunkFilename: path.posix.join(assetsDir, 'js/[id].js?[chunkhash]'),
        },
        optimization: {
          splitChunks: {
            chunks: 'all',
         }
    }

    return result;
  },
};
Menu