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'
    }),

 

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