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 production build
π¦ It inject CSS into JS making impacting web performance
βοΈβπ₯ Bad extending. It just exports config which is then mutated, making it not configurable on hight-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 + Terser to ESBuild makes it much faster (requires even less RAM than Vite)
Adding MiniCssExtractPlugin to extract CSS
Adding a good support for extending and configuration similar to @nextcloud/vite-config
Not solvable afaik
Also, there is RSPack, Rust-based Webpack compatible bundler.
Issue with Vite
π΄ It requires much more RAM on production build than Webpack + ESBuild
π¬ It has an old problem with multiple JS entrypoints. It's optimized for building libraries and results in tons of micro-chunkswhich 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.html entrypoint, but it is for Nextcloud apps
π Still lack of plugins. For even basic things we create our own plugins or use not widely-used ones
Some of the problem might be solved via rolldown (likely brining new in the beginning) or fixed in 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 of problems solved.
I'd like to discuss the future of this package since we are migrating to @nextcloud/vite-config.
Current state
@nextcloud/vite-config
, migrating to it, and call the migration a performance improvement for appsIssues with
webpack-vue-config
These issues can be solved:
babel + ts-loader + Terser
toESBuild
makes it much faster (requires even less RAM than Vite)MiniCssExtractPlugin
to extract CSS@nextcloud/vite-config
Also, there is RSPack, Rust-based Webpack compatible bundler.
Issue with Vite
index.html
entrypoint, but it is for Nextcloud appsSome of the problem might be solved via rolldown (likely brining new in the beginning) or fixed in 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 of problems solved.