Skip to content
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

Update Webpack to v5 #89741

Open
mshustov opened this issue Jan 29, 2021 · 9 comments · May be fixed by #191106
Open

Update Webpack to v5 #89741

mshustov opened this issue Jan 29, 2021 · 9 comments · May be fixed by #191106
Assignees
Labels
enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:large Large Level of Effort Team:Operations Team label for Operations Team

Comments

@mshustov
Copy link
Contributor

update to webpack v5 should:

  • significantly improve build time due to new caching mechanisms
  • allows us to remove several babel plugins for JS syntax supported natively
  • provide us with an opportunity to experiment with module federation feature which might be a game-changer for the problem with bloated bundle sizes.
@mshustov mshustov added Team:Operations Team label for Operations Team enhancement New value added to drive a business result labels Jan 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mshustov
Copy link
Contributor Author

blocked by cypress-io/cypress#8900
but there is workaround provided cypress-io/cypress#8900 (comment)

@tylersmalley tylersmalley added 1 and removed 1 labels Oct 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 12, 2021
@exalate-issue-sync exalate-issue-sync bot changed the title update webpack to v5 Update Webpack to v5 Dec 6, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:small Small Level of Effort labels Feb 15, 2022
@tylersmalley tylersmalley removed loe:large Large Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. EnableJiraSync labels Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:large Large Level of Effort labels Mar 22, 2022
@watson
Copy link
Contributor

watson commented Nov 10, 2022

Any update on this issue? The mentioned blocker has been fixed and we're already using a newer version of cypress that now supports webpack 5 👍

@mistic
Copy link
Member

mistic commented Nov 11, 2022

We have a deep abstraction over webpack@4 that was needed in order to create the @kbn/optimizer. Our team is short of hands at the moment and I don't think we will be able to prioritise this in the short/medium term as I think it won't be a trivial effort. Aside from that Module Federation was ported into webpack@4 and we still need to validate if webpack@5 really offer us the performance benefit we think it will. (\cc @spalger to make sure I'm not forgetting anything important).

@watson is this blocking you or somehow related with the deprecated hash algorithms on the node upgrade?

@watson
Copy link
Contributor

watson commented Nov 14, 2022

@mistic no it was due to some security vulnerabilities in some of the dev-dependencies we have related to webpack@4 that can only be fixed by upgrading to webpack@5. It's not a security issue per se as we're not impacted, but it's annoying to have them show up in scans.

@markov00
Copy link
Member

@mistic If I'm not wrong this also un-blocks importing dependencies (like elastic-charts) directly as ES modules instead of CommonJS as done now. (but I maybe wrong)

@mistic
Copy link
Member

mistic commented Nov 15, 2022

@markov00 probably just for client side code, we will have to also do the same for server side code. I think 😃

@watson @markov00 we will probably took a look at this in the future but we can't at the moment. We have other priorities to work on in foreseeable future 😬

@cee-chen
Copy link
Contributor

Quick note to self: Once webpack is on v5, the EUI team should attempt to unpin @hello-pangea/dnd from 16.2.0 🤞 (see #166676 (comment))

@kc13greiner
Copy link
Contributor

This upgrade would also allow engineers to run FIPS mode locally.

Our current version of Webpack has many hardcoded usages of md4 and md5

See node_modules/webpack/lib/ModuleFilenameHelpers.js and node_modules/webpack/lib/SourceMapDevToolPlugin.js

The changes in later versions of Webpack 5 respect the output.hashFunction better, which can be set to a compliant algorithm.

It might also be worth mentioning (since it might be involved in this work): webpack's file-loader is deprecated and has a default usage of md5, it is recommended to use asset-modules if we upgrade!

@Ikuni17 Ikuni17 self-assigned this Aug 14, 2024
@Ikuni17 Ikuni17 linked a pull request Aug 23, 2024 that will close this issue
39 tasks
@mistic mistic self-assigned this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:large Large Level of Effort Team:Operations Team label for Operations Team
Projects
None yet
9 participants