-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I'd like to discuss the future of this package since we are migrating to @nextcloud/vite-config.
Current state
- We are actively working on
@nextcloud/vite-config, migrating to it, and call the migration a performance improvement for apps - This config is almost not maintained for a while
Issues with webpack-vue-config
- 🐌 It is slow and requires much RAM for a production build
- 📦 It injects CSS into JS impacting web performance
- ⛓️💥 Bad extending. It just exports config which is then mutated, making it not configurable on high level and less stable for changes
- 🌲 It has an old issue with less effective Tree Shaking
These issues can be solved:
- Migrating from
babel + ts-loader + TersertoESBuildmakes it much faster (requires even less RAM than Vite) - Adding
MiniCssExtractPluginto extract CSS - Adding a good support for extending and configuration similar to
@nextcloud/vite-config - Not solvable afaik
Also, there is RSPack, a Rust-based Webpack compatible bundler.
Issue with Vite
- 🍴 It requires much more RAM on a production build than Webpack + ESBuild
- 🔬 It has an old problem with multiple JS entry points. It's optimized for building libraries and results in tons of micro-chunks-which is bad for performance. It is not so configurable in chunk generation as Webpack. it is not a problem for typical Vite users with
index.htmlentrypoint, but it is for Nextcloud apps (example -textapp). - 🔎 Still lack of plugins. For even basic things we create our own plugins or use not widely used ones
Some problems might be solved via rolldown (likely brining new in the beginning) or fixed in the future.
Further options
1. Consider Vite the only recommended option
And mark this package as deprecated and maintenance-only
2. Support both
And develop a new major of nextcloud/webpack-config with some problems solved.
Metadata
Metadata
Assignees
Labels
No labels