Can the project package build folder created by vue-cli 3.0be renamed through configuration?

The static file names after

npm run build are css, img, and js, respectively, but now in order to be compatible with previous projects, img wants to change the file name to images,js and the folder name that you want to change to scripts, history code is not allowed to change. After viewing the vue-cli configuration document, no relevant configuration is found. If you can"t change it, you need to change the file path manually after each package, which is troublesome. What configuration can be changed, or do you have any good suggestions?

Jul.07,2021

modify the configuration of webpack


can be adjusted by configuring

clipboard.png

you create a vue.config.js file in the root directory of your project

write

inside
module.exports = {
    chainWebpack: config => {
      config.module
        .rule('images')
        .use('url-loader')
        .tap(args => {
            return [
                {
                  limit: 4096,
                  fallback: {
                    loader: 'file-loader',
                    options: {
                      name: 'img/[name].[hash:8].[ext]'
                    }
                  }
                }
            ]
        })

  }

}

Please refer to an article I wrote about how to view and modify the configuration
https://codeshelper.com/a/11.

.

specific operations for official configuration modification
ide/webpack.html-sharp%E4%BF%AE%E6%94%B9%E6%8F%92%E4%BB%B6%E9%80%89%E9%A1%B9" rel=" nofollow noreferrer "> https://cli.vuejs.org/zh/guid.


naming rules, view the webpack.base.conf.js file in the build folder

Menu