Skip to content

feat: migrate extension build from webpack to rspack#5817

Open
capJavert wants to merge 5 commits intomainfrom
feat/extension-rspack-migration
Open

feat: migrate extension build from webpack to rspack#5817
capJavert wants to merge 5 commits intomainfrom
feat/extension-rspack-migration

Conversation

@capJavert
Copy link
Copy Markdown
Contributor

@capJavert capJavert commented Mar 27, 2026

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:

  • 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

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

capJavert and others added 3 commits March 27, 2026 18:08
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>
@capJavert capJavert self-assigned this Mar 27, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Mar 27, 2026 5:21pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Mar 27, 2026 5:21pm

Request Review

capJavert and others added 2 commits March 27, 2026 18:14
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant