[Build] Migrate Webpack4 to Rspack#11102
Merged
ruanyl merged 38 commits intoopensearch-project:mainfrom Jan 15, 2026
Merged
Conversation
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
+ update limits.yml Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
wanglam
approved these changes
Jan 14, 2026
Hailong-am
approved these changes
Jan 14, 2026
angle943
approved these changes
Jan 14, 2026
This was referenced Jan 16, 2026
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
This was referenced Jan 20, 2026
7 tasks
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.
Description
This PR migrates the OpenSearch Dashboards build system from Webpack to Rspack, RFC: #11125
This PR also combines @yubonluo's Webpack 5 migration of storybook #11107, see more discussions of storybook migration here: #11125 (comment)
Core changes
webpackto@rspack/corefor the build toolchainBundleRefsPluginwithVirtualModulesPluginentry_point_creator.tsandosd_bundles_loader_source.js, this changes how bundles are loaded and made available throughout the applicationbundle_deps_check_plugin.tsfor dependency validationModified packages
packages/osd-optimizer- Core optimizer package with major webpack config refactoringpackages/osd-monaco- Updated build scripts and migrate Webpack config to Rspackpackages/osd-pm- Updated package manager and migrate Webpack config to Rspackpackages/osd-ui-shared-deps- Updated shared dependencies bundling and migrate Webpack config to Rspackpackages/osd-ui-framework- Updated build configuration and migrate Webpack config to Rspackpackages/osd-std- Updated package dependenciesExtra changes
Step "Build plugins" of cypress workflow
cypress_workflow.ymlis changed to production build(added--distflag), this is add to solve the Github workflow "No space" issue which failed the step "Extract OpenSearch", also for CI jobs, it's preferrable to run the cypress tests against production build.Rspack produces slightly larger assets in development mode comparing with webpack4, adding
--distwill produce production build which is smaller. This is also an indicator that the current workflow runner has very limited spaced left, we might face similar issue in the future for example when opensearch image size increase as we download and extract it in the workflow.Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jestyarn test:jest_integrationSummary by CodeRabbit
Refactor
Chores
New Features
Bug Fixes
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.