feat: add docs about rspack#54
Draft
Mister-Hope wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class documentation for the @vuepress/bundler-rspack bundler (English + Chinese), and wires it into the docs site navigation and examples so users can discover and configure Rspack similarly to Vite/Webpack.
Changes:
- Add new Rspack bundler reference pages (EN/ZH) and link them from config/plugin/bundler/troubleshooting docs.
- Update migration/introduction/README messaging to include Rspack as a supported bundler.
- Update docs site navbar/sidebar and docs build config to allow selecting Rspack via
DOCS_BUNDLER=rspack.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/zh/reference/plugin-api.md | Adds Rspack example for extending bundler options + reference link |
| docs/zh/reference/config.md | Adds Rspack reference link alongside Vite/Webpack |
| docs/zh/reference/bundler/rspack.md | New ZH reference page for @vuepress/bundler-rspack options/FAQ |
| docs/zh/README.md | Mentions Rspack support in landing “bundler” feature text |
| docs/zh/guide/troubleshooting.md | Adds Rspack link in bundler troubleshooting entry list |
| docs/zh/guide/migration.md | Adds Rspack to supported bundlers + migration guidance/snippet |
| docs/zh/guide/markdown.md | Documents how to set isCustomElement for Rspack bundler |
| docs/zh/guide/introduction.md | Updates project history/support narrative to include Rspack |
| docs/zh/guide/bundler.md | Adds install/use instructions and reference link for Rspack |
| docs/zh/guide/assets.md | Notes absolutePathPrependBase guidance for Rspack |
| docs/reference/plugin-api.md | Adds Rspack example for extending bundler options + reference link |
| docs/reference/config.md | Adds Rspack reference link alongside Vite/Webpack |
| docs/reference/bundler/rspack.md | New EN reference page for @vuepress/bundler-rspack options/FAQ |
| docs/README.md | Mentions Rspack support in landing “bundlers” feature text |
| docs/guide/troubleshooting.md | Adds Rspack link in bundler troubleshooting entry list |
| docs/guide/migration.md | Adds Rspack to supported bundlers + migration guidance/snippet |
| docs/guide/markdown.md | Documents how to set isCustomElement for Rspack bundler |
| docs/guide/introduction.md | Updates project history/support narrative to include Rspack |
| docs/guide/bundler.md | Adds install/use instructions and reference link for Rspack |
| docs/guide/assets.md | Notes absolutePathPrependBase guidance for Rspack |
| docs/.vuepress/configs/sidebar/zh.ts | Adds Rspack page into ZH sidebar bundlers section |
| docs/.vuepress/configs/sidebar/en.ts | Adds Rspack page into EN sidebar bundlers section |
| docs/.vuepress/configs/navbar/zh.ts | Adds Rspack page into ZH navbar bundlers dropdown |
| docs/.vuepress/configs/navbar/en.ts | Adds Rspack page into EN navbar bundlers dropdown |
| docs/.vuepress/config.ts | Adds DOCS_BUNDLER=rspack selection + markdown assets tweak for webpack/rspack |
| .vscode/settings.json | Adds “rspack” to workspace dictionary/word list |
Comments suppressed due to low confidence (1)
docs/zh/reference/bundler/rspack.md:152
- 这里逗号后多了一个空格(“与 Webpack 一样, Rspack ...”),建议移除以符合中文排版习惯。
与 Webpack 一样, Rspack 不会为 Public 文件自动处理 `base`。因此如果你修改了网站的 `base`,建议你在引用 Public 图片文件时使用 [Base Helper](../../guide/assets.md#base-helper)。
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
7
| import { rspackBundler } from '@vuepress/bundler-rspack' | ||
| import { viteBundler } from '@vuepress/bundler-vite' | ||
| import { webpackBundler } from '@vuepress/bundler-webpack' | ||
| import { docsearchPlugin } from '@vuepress/plugin-docsearch' |
Comment on lines
+150
to
+156
| ### Referencing Public Files after Changing `base` | ||
|
|
||
| Like Webpack, Rspack won't handle `base` for public files automatically. So if you change the `base` of your site, you'd better to use [Base Helper](../../guide/assets.md#base-helper) when referencing an public image file. | ||
|
|
||
| ### Using with Default Theme | ||
|
|
||
| Default theme is using [SASS](https://sass-lang.com/) as CSS pre-processor, so you might need to install [sass-loader](https://www.npmjs.com/package/sass-loader) as a peer dependency to make it work with Rspack, especially when you are using [pnpm](https://pnpm.io/). |
|
|
||
| - 详情: | ||
|
|
||
| 如果你的对象只有那些 "常青树" 浏览器,你可以将其设置成 `true` 。这将会禁用一些转译过程和 Polyfills ,带来更快的构建速度和更小的文件体积。 |
Comment on lines
+193
to
+194
| // extends options of @vuepress/bundler-rspack | ||
| if (app.options.bundler.name === '@vuepress/bundler-rspack') { |
| - VuePress v2 is now using Vue 3, so make sure your components and other client files are compatible with Vue 3. | ||
| - VuePress v2 is developed with TypeScript, so it provides better TS support now. It's highly recommended to use TypeScript to develop plugins and themes. VuePress config file also supports TypeScript, and you can use `.vuepress/config.ts` directly. | ||
| - VuePress v2 supports both Webpack and Vite as bundler. You can choose the bundler you like in your config file. | ||
| - VuePress v2 supports Webpack, Vite and Rspack as bundler. You can choose the bundler you like in your config file. |
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.
No description provided.