Skip to content

html-webpack-plugin is outdated #6109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jantimon opened this issue Dec 5, 2020 · 13 comments · Fixed by #6269
Closed

html-webpack-plugin is outdated #6109

jantimon opened this issue Dec 5, 2020 · 13 comments · Fixed by #6269

Comments

@jantimon
Copy link

jantimon commented Dec 5, 2020

Version

4.5.9

The current used version of the html-webpack-plugin can be seen here: https://unpkg.com/@vue/cli-service/package.json

What is expected?

@vue/cli-service is using html-webpack-plugin 3.2.0 which is slower than html-webpack-plugin 4.5.0 and quite outdated (3 years since the release)

See all information about the html-webpack-plugin 4.x release here: https://dev.to/jantimon/html-webpack-plugin-4-has-been-released-125d

Furthermore for webpack 5.x there will be a html-webpack-plugin 5.x which is in alpha right now


I am the author of the html-webpack-plugin - please let me know if I can be of any help to migrate to a supported version

@haoqunjiang
Copy link
Member

haoqunjiang commented Dec 5, 2020

Hi, thanks for reaching out! I've recently updated to html-webpack-plugin 4 in the dev branch, and an alpha version would be released very soon. It will use webpack 5 by default.

But for now, as the plugin ecosystem hasn't fully caught up with webpack 5, I would like the next version of Vue CLI to also support opting out to webpack 4 compilation.

So I'm wondering if html-webpack-plugin can still keep support for webpack 4?

@jantimon
Copy link
Author

jantimon commented Dec 5, 2020

hey @sodatea

wow cool that sounds great :)
if you need any help e.g. with the template option or anything else just ping me.

Unfortunately webpack 5 is very different from webpack 4 and therefore it is very hard to maintain webpack 4 & 5 with the same html-webpack-plugin - the support plan is the following:

  • html-webpack-plugin 3.x - out of support - fully compatible to webpack <= 4
  • html-webpack-plugin 4.x - only bug fixes - fully compatible to webpack 4 & partialy compatible to webpack 5
  • html-webpack-plugin 5.x - active branch - fully compatible to webpack 5

Please note that html-webpack-plugin 5 is still wip - the current progress can be seen here:
jantimon/html-webpack-plugin#1527

@haoqunjiang
Copy link
Member

Besides dropping webpack 4 support, will there be any user-facing breaking changes in configuration options? If no, I think I can still find a way to support both versions 🤔

@jantimon
Copy link
Author

jantimon commented Dec 5, 2020

that should be possible there are only 3 breaking changes for html-webpack-plugin 5:

  • Drop support for appcache-webpack-plugin
  • scripts are now loaded deferred in the tag to improve page load performance by default - This can be turned off by setting scriptLoading: ‘blocking’
  • drop webpack 4 and node <= 10 support

@jantimon
Copy link
Author

jantimon commented Feb 5, 2021

@sodatea html-webpack-plugin 5.x was officially released this week (it is the same code which was released as beta 1 month ago)

did you had any success upgrading vue-cli to a current html-webpack-plugin?

@jantimon
Copy link
Author

wow so cool thanks a lot @sodatea

@thebrownfox
Copy link

@sodatea do you think you could release another alpha with this dependency updated? It stopped working this morning because of this dependency.

@haoqunjiang
Copy link
Member

Yeah tomorrow.
Today is the last day of my Lunar New Year vacation and I haven't got the time to reach for my computer yet.

@thebrownfox
Copy link

Oh cool, thank you. Enjoy your free time 😊

@zhangchenna
Copy link

麻烦尽快更新吧,现在项目跑不起来了

ERROR  Failed to compile with 1 error                                                                                           下午3:11:04

 Error: The loader "/Volumes/Work/vue3-demo/node_modules/html-webpack-plugin/lib/loader.js!/Volumes/Work/vue3-demo/public/index.html" didn'  t return html.
 
 - index.js:336 HtmlWebpackPlugin.evaluateCompilationResult
   [vue3-demo]/[html-webpack-plugin]/index.js:336:24
 
 - index.js:243 
   [vue3-demo]/[html-webpack-plugin]/index.js:243:22
 
 - runMicrotasks
 
 - task_queues.js:93 processTicksAndRejections
   internal/process/task_queues.js:93:5
 
 - async Promise.all
 
 - async Promise.all

@jantimon
Copy link
Author

@zhangchenna
Copy link

@haoqunjiang
Copy link
Member

Fixed in alpha.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants