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

那就是修改源码

约550行:this

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

而后这样使用:code

new HtmlWebpackPlugin({
      disableScript: true,
      //...
    })
相关文章
相关标签/搜索