RFC: experimental feature workflow #2777
IWANABETHATGUY
started this conversation in
RFC
Replies: 3 comments
-
How about adding |
Beta Was this translation helpful? Give feedback.
0 replies
-
These solutions are just proposals, feel free to publish your different ideas and opinion |
Beta Was this translation helpful? Give feedback.
0 replies
-
IMO, I think solution 1 is good enough.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
The goal of Rspack is to create a bundler that is as compatible with webpack as possible. However, in reality, things are often more complicated, and we have to make many configuration adjustments to meet the needs of users, including but not limited to performance and user experience. For example, to provide a better HMR user experience, we choose to use an incremental build algorithm to support HMR (
experiments.incrementalRebuild
). To progressively refactor the underlying bundle splitting implementation, we introducedexperiments.newSplitChunks
. There are also some unstable features likeexperiments.lazyCompilation
andexperiments.asyncWebAssembly
.Issues and Solutions
Conflict between Rspack experiments and webpack.config.js experiments
Description
Webpack already has a configuration item called
experiments
, although this configuration item is not commonly used (compared to loader in webpack.config.js, the usage frequency is about 100 times lower). Sharing the same configuration item will confuse users, making it difficult to distinguish which configuration items are compatible with webpack.config.js and which are Rspack's experimental configurations.Solution
experiments
field with webpack, but put all Rspack-specific experimental properties intoexperiments.rspack
. For example, the current configuration:becomes:
experimental
. The original configuration:becomes:
How to handle stable experimental features
Description
The existence of experimental features is to explore more solutions to improve build performance, including but not limited to build efficiency, artifact size, and DX, without breaking the user experience. All experimental features can be divided into two categories: some features are abandoned because they do not meet user expectations, and some features are stable after long-term experimentation and user satisfaction. In this case, continuing to place the feature in experiments is obviously inappropriate (because experiments implicitly tell users that these features are unstable and should not be used in production).
Solution
If it is a feature in webpack
experiments
, follow the adjustments of webpack (that require webpack to continue to iterate). If it is anexperiments
feature in Rspack, continue to iterate it by placing it inbuiltins
.How to promote experimental features
Description
Experimental features cannot evolve into stable features over time automatically. To become a stable feature, a large number of volunteers are needed to experiment and provide feedback. The following is a simple process for promoting experimental features:
builtins
. However, do not immediately delete the corresponding configuration item inexperiments
. You can useutil.deprecate
to recommend users to use the configuration item inbuiltins
. After a certain version iteration, delete the configuration item in experiments to complete the iteration advancement of the entire experimental feature.Beta Was this translation helpful? Give feedback.
All reactions