feat(workspace | preview): migrate from webpack to rspack#10187
Merged
feat(workspace | preview): migrate from webpack to rspack#10187
Conversation
Reduces code duplication between rspack.dev.config.ts and rspack.browser.config.ts by extracting shared rules (SWC loader, source-map loader, style rules, font rules) and constants (moduleFileExtensions, RspackManifestPlugin) into a common module. Also fixes regex backtracking vulnerability in navigateFallbackDenylist flagged by SonarQube (changed [^/?]+ to [^/.?]+ to prevent overlapping character classes). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…k configs Extract shared resolveAlias(), resolveFallback, and resolveFallbackDev into rspack.common.ts to eliminate duplicated blocks across browser, dev, and SSR configs. Net -32 lines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Export RspackManifestPlugin from @teambit/ui and import it in the pre-bundle rspack config instead of maintaining an identical copy. Fixes SonarCloud duplicated lines density flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…undle Extract RspackManifestPlugin into its own file so that exporting it from @teambit/ui index does not pull rspack.common.ts and its require.resolve calls for loaders into the preview bundle graph. Fixes Can not resolve os/http/vm errors during --rebuild. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert RspackManifestPlugin export from @teambit/ui index to avoid pulling build-time code into the browser bundle (caused runtime .replace error on undefined) - Give pre-bundle its own local copy of RspackManifestPlugin in a separate file (rspack-manifest-plugin.ts) - Fix import/default lint errors: use named import for rspack - Fix TS errors: Stats.toString needs args, proxy type cast - All lint and type checks pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
luvkapur
commented
Feb 9, 2026
luvkapur
commented
Feb 9, 2026
…et exclusion patterns in rspack config
|
GiladShoham
approved these changes
Feb 10, 2026
luvkapur
added a commit
that referenced
this pull request
Feb 12, 2026
Reverts the following commits: - 9527d01 fix(rspack): migrate to built in manifest plugin (#10194) - 225881d feat(workspace | preview): migrate from webpack to rspack (#10187) - 93b656a feat(workspace): enable graphql batching by default (#10188) Restores webpack-based dev server and preview bundling. Disables graphql batching (reverts to non-batched default). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR migrates the UI server and Preview pre-bundle pipelines from Webpack to Rspack.
Replaced Webpack bundling paths for:
Added/standardized Rspack config flow:
Reduced classic loader usage and moved core work to Rspack built-ins where supported.