html-webpack-plugin不输出script标签的方法

那就是修改源码

约550行:

    if (!this.options.disableScript) {
      if (this.options.inject === 'head') {
        head = head.concat(scripts);
      } else {
        body = body.concat(scripts);
      }
    }

然后这样使用:

    new HtmlWebpackPlugin({
      disableScript: true,
      //...
    })
posted @ 2018-08-31 17:19  LisPythoniC  阅读(652)  评论(0编辑  收藏  举报