Search code examples
vue.jsvuejs2vue-cli-3

How to rename app.js file in index.html using VueCli 3


VueCli3 automatically add app.js in index.html. I want to rename that app.js file some other name. Is it possible to do that ?


Solution

  • Just create a file called vue.config.js in your project root directory and, in the configureWebpack property, you can set the name for the output js file.

    vue.config.js

    module.exports = {
    
        configureWebpack: {
    
            output: {
    
                filename: "appname.js"
    
            },
    
        },
    
    }