vue2.x打包后index.html链接资源链接没有引号

在buildwebpack.prod.conf.js找到如下配置,找到removeAttributeQuotes: true,将true改为false,重新打包即可


    new HtmlWebpackPlugin({
      filename: config.build.index,
      template: 'index.html',
      inject: true,
      minify: {
        removeComments: true,
        collapseWhitespace: true,
        removeAttributeQuotes: false //将此处的true改为false
      },
      chunksSortMode: 'dependency'
    }),

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章