feat: migrate extension build from webpack to rspack#5817
Open
feat: migrate extension build from webpack to rspack#5817
Conversation
Replace webpack 5 with rspack for the extension build. Rspack is a drop-in webpack replacement written in Rust that uses ~1.3GB vs webpack's ~5GB memory, and builds in ~10s vs ~46s. Changes: - Add rspack.config.js using rspack built-in plugins (HtmlRspackPlugin, CssExtractRspackPlugin, CopyRspackPlugin, CleanPlugin) - Replace babel-loader with builtin:swc-loader - Remove ForkTsCheckerWebpackPlugin (rspack handles TS natively, CI typechecks separately) - Replace dotenv-webpack with dotenv + DefinePlugin - Use per-entry runtime config instead of optimization.runtimeChunk - Downsize CI from xlarge (16GB) to medium (4GB) - Remove webpack, webpack-cli, and related deps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dotenv-webpack stubbed process.env as "MISSING_ENV_VAR" so undefined env var access returns undefined instead of throwing. Replicate this in the rspack DefinePlugin config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Replace webpack 5 with rspack for the extension build. Rspack is a drop-in webpack replacement written in Rust that uses ~1.3GB vs webpack's ~8.7GB memory, and builds in ~10s vs ~46s.
Changes:
Changes
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Preview domain
https://feat-extension-rspack-migration.preview.app.daily.dev