在VUE单页应用添加页面的设置

webpack.dev.conf.js

加了个


new HtmlWebpackPlugin({

      filename: 'login.html',

      template: 'login.html',

      inject: true

    }),

webpack.prod.conf.js
加了个

    new HtmlWebpackPlugin({

      filename: 'login.html',

      template: 'login.html',

      inject: false,

      minify: {

        removeComments: true,

        collapseWhitespace: true,

        removeAttributeQuotes: true

        // more options:

        //

[https://github.com/kangax/html-minifier#options-quick-reference](https://github.com/kangax/html-minifier#options-quick-reference)

      },

      // necessary to consistently work with multiple chunks via CommonsChunkPlugin

      chunksSortMode: 'dependency'

    }),

你可能感兴趣的:(在VUE单页应用添加页面的设置)