• html-webpack-plugin插件


      功能:自动生成html模板

      var  HtmlWebpackPlugin = require('html-webpack-plugin') 

      module.exports = {

        ...,

        plugins: [

          new HtmlWebpackPlugin({

           filename: config.build.index   //配置的html文件目录是相对于output.path路径

           template: 'index.html' //本地模板文件的位置

           inject: true   //注入所有静态资源

           minify: {

             removeComments: true,  //删除注释

             collapseWhitespace: true,  //删除空格

             removeAttributeQuotes: true //删除引用

           }

          })

        ]

      }  

      资料: https://www.cnblogs.com/wonyun/p/6030090.html    

          https://github.com/ampedandwired/html-webpack-plugin
     
          https://github.com/kangax/html-minifier#options-quick-reference
  • 相关阅读:
    win2K/win2003终端服务器超出最大允许连接数解决之道
    DOM与SAX读取xml文件例程
    ubuntu安装配置telnet
    SCTP 简介
    groovy 脚本中文乱码问题解决
    编码问题研究
    gvim支持utf8
    ctags使用方法
    我家猫病了。。
    小朋友搞笑造句
  • 原文地址:https://www.cnblogs.com/xshaohua-com/p/7828741.html
Copyright © 2020-2023  润新知