fix(plugin-less): parallelLoader config is no longer needed in Rspack v2#7166
fix(plugin-less): parallelLoader config is no longer needed in Rspack v2#7166chenjiahan merged 1 commit intomainfrom
parallelLoader config is no longer needed in Rspack v2#7166Conversation
Summary of ChangesHello @chenjiahan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
Updates @rsbuild/plugin-less to avoid setting the deprecated/unnecessary experiments.parallelLoader flag when running on Rspack v2 (Rsbuild v2+), while preserving the legacy behavior for Rsbuild v1.
Changes:
- Gate
chain.experiments({ parallelLoader: true })behind anisV1check. - Add an inline comment explaining why the experiments flag is no longer applied for newer versions.
Comments suppressed due to low confidence (1)
packages/plugin-less/src/index.ts:294
- This change alters behavior when
pluginLess({ parallel: true })is used: Rsbuild v2+ will no longer setexperiments.parallelLoader. There are snapshot tests for this plugin but none covering theparalleloption; please add a test that asserts the experiments config differs between Rsbuild v1 and v2 whenparallelis enabled to prevent regressions.
// `experiments.parallelLoader` is no longer required in Rspack 2.0+
if (parallel && isV1) {
chain.experiments({
...chain.get('experiments'),
parallelLoader: true,
});
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the less plugin to conditionally apply the parallelLoader configuration. The change correctly identifies that this configuration is no longer needed in newer Rspack versions. My review includes a suggestion to make the version check more robust by inspecting the Rspack version directly, rather than relying on the Rsbuild version as a proxy. This will improve the long-term maintainability of the code.
Summary
The
experiments.parallelLoaderconfig is no longer needed in Rspack v2.Related Links
experiments.parallelLoaderrspack#12658Checklist