zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    webpack初体验
    Sql server 数据库 单用户切换为多用户
    JAVA加密
    TransactionScrope 2
    TransactionScrope
    ORA-14450
    C#.NET 各种连接字符串
    如何获取得到新浪的授权?
    加载JSON文件,Plist文件
    屏幕截图
  • 原文地址:https://www.cnblogs.com/xshaohua-com/p/7828741.html
Copyright © 2011-2022 走看看