Skip to content

Finalize migration to Vite (Drop Webpack)#24556

Draft
cconard96 wants to merge 6 commits into
glpi-project:mainfrom
cconard96:vite/vendor_libs
Draft

Finalize migration to Vite (Drop Webpack)#24556
cconard96 wants to merge 6 commits into
glpi-project:mainfrom
cconard96:vite/vendor_libs

Conversation

@cconard96

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • This change requires a documentation update. (Dev docs mention webpack)

Description

Relies on #22356, #24550, and #24549

  • Drops Webpack completely in favor of Vite for a new, faster, simpler and more streamlined frontend build process.
  • Drops over 15 dependencies, adds 2. Swaps sass for sass-embedded which is the faster version that Vite recommends.

TODO:

  • Copy Tabler RTL CSS
  • Try slimming Monaco build more

Total npm run build time:

  • Webpack: 25s
  • Vite: 20s

Build times should improve more whenever the JS gets modernized because:

  • The current use of require prevents tree-shaking making our bundles even more bloated.
  • Tabler alone is very big (700kb of CSS when compiled). Takes Vite 8 seconds to build.
  • Normally Vite only supports a single entrypoint in library build mode and the workaround spawns new build environments for every bundle which is probably not very efficient.
  • Vite normally inlines assets like CSS inside the JS in library build mode but I had to implement a plugin to extract them because Tabler has a ton of resources we would never use like legacy TTF/WOFF fonts and it made the file size even more unreasonable. 70% of the time spent on the Tabler bundle is taken within the vite-plugin-lib-assets plugin.

@cconard96 cconard96 self-assigned this Jun 13, 2026
@cconard96 cconard96 added task javascript Pull requests that update Javascript code labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant