feat(bundler-rspack): add rspack bundler#1703
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new @vuepress/bundler-rspack package that adds Rspack as an alternative bundler alongside the existing Vite and Webpack bundlers. The implementation closely mirrors the structure of @vuepress/bundler-webpack, including base/client/server config builders (via rspack-chain), dev server with HMR and a trailing-slash middleware, and a build pipeline that produces a client manifest and SSR-renders pages. The package is wired into the meta vuepress package as an optional peer and into the e2e test setup.
Changes:
- Add new
@vuepress/bundler-rspackpackage with config builders, dev/build pipelines, SSR/markdown loaders, and types. - Wire the new bundler into
packages/vuepress(optional peer dependency) and intoe2e(config + scripts) plus updatedpnpm-lock.yaml. - Add
rspackto the VS Code spell-check dictionary.
Reviewed changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Lockfile updates for new Rspack-related dependencies. |
| packages/vuepress/package.json | Adds @vuepress/bundler-rspack as an optional peer dependency. |
| packages/bundler-rspack/package.json | New package manifest with Rspack/loader deps. |
| packages/bundler-rspack/README.md | Package readme. |
| packages/bundler-rspack/tsdown.config.ts | tsdown build config for ESM entry + CJS loaders. |
| packages/bundler-rspack/src/index.ts | Public entry exporting rspackBundler and types. |
| packages/bundler-rspack/src/rspackBundler.ts | Bundler factory wiring dev/build. |
| packages/bundler-rspack/src/types.ts | Bundler/loader option types. |
| packages/bundler-rspack/src/resolveRspackConfig.ts | Applies chainRspack/configureRspack hooks. |
| packages/bundler-rspack/src/config/* | Base/client config (entry, mode, devtool, resolve, module rules, plugins, other options). |
| packages/bundler-rspack/src/dev/* | Dev server config, trailing-slash middleware, dev runner. |
| packages/bundler-rspack/src/build/* | Build pipeline, client plugin/manifest, SSR rendering helpers. |
| packages/bundler-rspack/src/loaders/* | Vue markdown loader and SSR loader (TS + CJS shims). |
| e2e/package.json | Adds rspack-flavored e2e scripts and dependency. |
| e2e/docs/.vuepress/config.ts | Selects rspack bundler when E2E_BUNDLER=rspack. |
| .vscode/settings.json | Adds rspack to spell-check dictionary. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 25902085125Coverage remained the same at 72.961%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
The PR should be ready for review |
| jsc: { | ||
| parser: isTypescript | ||
| ? { | ||
| syntax: 'typescript', | ||
| tsx: true, | ||
| ...jsc.parser, | ||
| } | ||
| : { | ||
| syntax: 'ecmascript', | ||
| jsx: true, | ||
| ...jsc.parser, | ||
| }, | ||
|
|
||
| transform: { | ||
| react: { | ||
| runtime: 'classic', | ||
| pragma: 'jsx', | ||
| pragmaFrag: 'Fragment', | ||
| development: false, | ||
| ...jsc.transform?.react, | ||
| }, | ||
| ...jsc.transform, | ||
| }, | ||
| ...(jsc as SwcLoaderJscConfig), | ||
| }, |
No description provided.