numical / script-ext-html-webpack-plugin

Enhances html-webpack-plugin functionality with different deployment options for your scripts including 'async', 'preload', 'prefetch', 'defer', 'module', custom attributes, and inlining.
MIT License
588 stars 105 forks source link

while the inline file preload link has not be deleted? #77

Closed qiangf811 closed 4 years ago

qiangf811 commented 4 years ago

i used for webpack runtimeChunk。

new ScriptExtHtmlWebpackPlugin({
      inline: /runtime~.+\.js$/
})

of course the code has be injected in index.html,but the preload link has existed

 <link href=js/chunk-vendors.1e5c55d3.js rel=preload as=script>
 <link href=js/runtime~app.2f2e1145.js rel=preload as=script>
 <link href=css/app.b087a504.css rel=stylesheet>

why? so that it will cause a error in chrome.

what should i do.

Lynn-cc commented 3 years ago

我也有一样的问题,请问你怎么解决的? I have the same problem, could you tell me how you solve it ?

qiangf811 commented 3 years ago

我也有一样的问题,请问你怎么解决的? I have the same problem, could you tell me how you solve it ? 给preload插件配置fileBlacklist,将runtime文件过滤掉

Lynn-cc commented 3 years ago

我也有一样的问题,请问你怎么解决的? I have the same problem, could you tell me how you solve it ? 给preload插件配置fileBlacklist,将runtime文件过滤掉

谢谢回复。 我最后是换了个插件html-webpack-inline-source-plugin 来解决的。