nextcloud-libraries / nextcloud-libraries/webpack-vue-config
RFC: future of this package
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 2
- Avg merge
- 57m
- Merged PRs (30d)
- 10
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the migration to @nextcloud/vite-config and the package’s listed Webpack and Vite limitations. Done means reaching and documenting a decision between making Vite the only recommended option or supporting both with a new major of nextcloud/webpack-config.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite, webpack
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100