【问题标题】:How to rename app.js file in index.html using VueCli 3如何使用 Vue Cli 3 重命名 index.html 中的 app.js 文件
【发布时间】:2019-02-04 12:58:11
【问题描述】:

VueCli3 会在 index.html 中自动添加 app.js。我想将该 app.js 文件重命名为其他名称。有可能吗?

【问题讨论】:

    标签: vue.js vuejs2 vue-cli-3


    【解决方案1】:

    只需在项目根目录中创建一个名为vue.config.js 的文件,并在configureWebpack 属性中设置输出js 文件的名称。

    vue.config.js

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-03
      • 1970-01-01
      • 2021-11-21
      相关资源
      最近更新 更多