美文网首页
在VUE单页应用添加页面的设置

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

作者: infi_ | 来源:发表于2017-11-23 17:56 被阅读0次

    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单页应用添加页面的设置

          本文链接:https://www.haomeiwen.com/subject/ujxtbxtx.html