Skip to content

Commit

Permalink
chore: move vue jsx plugin to separate repo (#3409)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Sep 8, 2024
1 parent 5e9a11a commit fce3931
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 145 deletions.
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@rsbuild/plugin-svgr": "workspace:*",
"@rsbuild/plugin-swc": "workspace:*",
"@rsbuild/plugin-vue": "workspace:*",
"@rsbuild/plugin-vue-jsx": "workspace:*",
"@rsbuild/plugin-vue-jsx": "^1.0.1",
"@rsbuild/webpack": "workspace:*",
"@module-federation/rspack": "0.6.0",
"@scripts/test-helper": "workspace:*",
Expand Down
155 changes: 43 additions & 112 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/docs/en/guide/framework/vue3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For projects using Vue CLI, you can refer to the [Vue CLI Migration Guide](/guid

## Use the JSX syntax of Vue

If you need to use the JSX syntax of Vue, you also need to register the [Vue 3 JSX plugin](/plugins/list/plugin-vue-jsx).
If you need to use the JSX syntax of Vue, you also need to register the [@rsbuild/plugin-vue-jsx](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx).

## TypeScript Support

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/migration/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Most common Vite plugins can be easily migrated to Rsbuild plugins, such as:
| [@vitejs/plugin-react-swc](https://www.npmjs.com/package/@vitejs/plugin-react-swc) | [@rsbuild/plugin-react](/plugins/list/plugin-react) |
| [@vitejs/plugin-vue](https://www.npmjs.com/package/@vitejs/plugin-vue) | [@rsbuild/plugin-vue](/plugins/list/plugin-vue) |
| [@vitejs/plugin-vue2](https://www.npmjs.com/package/@vitejs/plugin-vue2) | [@rsbuild/plugin-vue2](https://github.com/rspack-contrib/rsbuild-plugin-vue2) |
| [@vitejs/plugin-vue-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue-jsx) | [@rsbuild/plugin-vue-jsx](/plugins/list/plugin-vue-jsx) |
| [@vitejs/plugin-vue-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue-jsx) | [@rsbuild/plugin-vue-jsx](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx) |
| [@vitejs/plugin-vue2-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue2-jsx) | [@rsbuild/plugin-vue2-jsx](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx) |
| [@vitejs/plugin-basic-ssl](https://www.npmjs.com/package/@vitejs/plugin-basic-ssl) | [@rsbuild/plugin-basic-ssl](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl) |
| [@vitejs/plugin-legacy](https://www.npmjs.com/package/@vitejs/plugin-legacy) | No need to use, see [Browser Compatibility](/guide/advanced/browser-compatibility) for details |
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/migration/webpack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Most of the common webpack loaders and plugins can still be used in Rsbuild, but
| [@svgr/webpack](https://www.npmjs.com/package/@svgr/webpack) | [SVGR Plugin](/plugins/list/plugin-svgr) |
| [fork-ts-checker-webpack-plugin](https://www.npmjs.com/package/fork-ts-checker-webpack-plugin) | [@rsbuild/plugin-type-check](https://github.com/rspack-contrib/rsbuild-plugin-type-check) |
| [node-polyfill-webpack-plugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin) | [Node Polyfill Plugin](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) |
| [@vue/babel-plugin-jsx](https://www.npmjs.com/package/@vue/babel-plugin-jsx) | [Vue JSX Plugin](/plugins/list/plugin-vue-jsx) |
| [@vue/babel-plugin-jsx](https://www.npmjs.com/package/@vue/babel-plugin-jsx) | [Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx) |
| [@vue/babel-preset-jsx](https://www.npmjs.com/package/@vue/babel-preset-jsx) | [Vue 2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx) |
| [eslint-webpack-plugin](https://www.npmjs.com/package/eslint-webpack-plugin) | [ESLint Plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint) |
| [babel-plugin-styled-components](https://www.npmjs.com/package/babel-plugin-styled-components) | [Styled Components Plugin](https://github.com/rsbuild-contrib/rsbuild-plugin-styled-components) |
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/start/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Here are all the main features supported by Rsbuild.
| React Refresh | Optional feature, enable React Refresh | <ul><li>[Hot Module Replacement](/guide/advanced/hmr)</li><li>[dev.hmr](/config/dev/hmr)</li></ul> |
| SVGR | Optional feature, transform SVG to React component | <ul><li>[SVGR Plugin](/plugins/list/plugin-svgr)</li></ul> |
| Vue 3 SFC | Optional feature, enable compilation of Vue 3 SFC (Single File Components) | <ul><li>[Vue Plugin](/plugins/list/plugin-vue)</li></ul> |
| Vue 3 JSX | Optional feature, enable compilation of Vue 3 JSX syntax | <ul><li>[Vue JSX Plugin](/plugins/list/plugin-vue-jsx)</li></ul> |
| Vue 3 JSX | Optional feature, enable compilation of Vue 3 JSX syntax | <ul><li>[Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx)</li></ul> |
| Vue 2 SFC | Optional feature, enable compilation of Vue 2 SFC (Single File Components) | <ul><li>[Vue 2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2)</li></ul> |
| Vue 2 JSX | Optional feature, enable compilation of Vue 2 JSX syntax | <ul><li>[Vue 2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx)</li></ul> |
| Svelte | Optional feature, enable compilation of Svelte component | <ul><li>[Svelte Plugin](/plugins/list/plugin-svelte)</li></ul> |
Expand Down
10 changes: 0 additions & 10 deletions website/docs/en/guide/start/npm-packages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ Vue 3 plugin that provides support for Vue 3 Single-File Components (SFC).
- [Source Code](https://github.com/web-infra-dev/rsbuild/tree/main/packages/plugin-vue)
- [Documentation](/plugins/list/plugin-vue)

## @rsbuild/plugin-vue-jsx

![](https://img.shields.io/npm/v/@rsbuild/plugin-vue-jsx?style=flat-square&colorA=564341&colorB=EDED91)

Vue 3 JSX plugin that provides support for Vue 3 JSX / TSX syntax.

- [npm](https://npmjs.com/package/@rsbuild/plugin-vue-jsx)
- [Source Code](https://github.com/web-infra-dev/rsbuild/tree/main/packages/plugin-vue-jsx)
- [Documentation](/plugins/list/plugin-vue-jsx)

## @rsbuild/plugin-sass

![](https://img.shields.io/npm/v/@rsbuild/plugin-sass?style=flat-square&colorA=564341&colorB=EDED91)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/plugins/list/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Plugins available for the React framework:
Plugins available for the Vue framework:

- [Vue Plugin](/plugins/list/plugin-vue): Provides support for Vue 3 SFC (Single File Components).
- [Vue JSX Plugin](/plugins/list/plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.
- [Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.
- [Vue2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2): Provides support for Vue 2 SFC (Single File Components).
- [Vue2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx): Provides support for Vue 2 JSX / TSX syntax.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/plugins/list/plugin-vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SourceCode } from 'rspress/theme';
The Vue plugin provides support for Vue 3 SFC (Single File Components). The plugin internally integrates [vue-loader](https://vue-loader.vuejs.org/) v17.

:::tip
For Vue 3 JSX / TSX syntax, please use the [Vue JSX plugin](/plugins/list/plugin-vue-jsx).
For Vue 3 JSX / TSX syntax, please use the [Vue JSX plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx).
:::

## Quick Start
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/framework/vue3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default defineConfig({

## 使用 Vue JSX 语法

如果你需要使用 Vue 的 JSX 语法,还需要注册 Rsbuild 的 [Vue 3 JSX 插件](/plugins/list/plugin-vue-jsx)
如果你需要使用 Vue 的 JSX 语法,还需要注册 Rsbuild 的 [Vue 3 JSX 插件](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx)

## TypeScript 支持

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/migration/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Rsbuild 会在构建时自动注入 `<script>` 标签到生成的 HTML 文件中
| [@vitejs/plugin-react-swc](https://www.npmjs.com/package/@vitejs/plugin-react-swc) | [@rsbuild/plugin-react](/plugins/list/plugin-react) |
| [@vitejs/plugin-vue](https://www.npmjs.com/package/@vitejs/plugin-vue) | [@rsbuild/plugin-vue](/plugins/list/plugin-vue) |
| [@vitejs/plugin-vue2](https://www.npmjs.com/package/@vitejs/plugin-vue2) | [@rsbuild/plugin-vue2](https://github.com/rspack-contrib/rsbuild-plugin-vue2) |
| [@vitejs/plugin-vue-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue-jsx) | [@rsbuild/plugin-vue-jsx](/plugins/list/plugin-vue-jsx) |
| [@vitejs/plugin-vue-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue-jsx) | [@rsbuild/plugin-vue-jsx](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx) |
| [@vitejs/plugin-vue2-jsx](https://www.npmjs.com/package/@vitejs/plugin-vue2-jsx) | [@rsbuild/plugin-vue2-jsx](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx) |
| [@vitejs/plugin-basic-ssl](https://www.npmjs.com/package/@vitejs/plugin-basic-ssl) | [@rsbuild/plugin-basic-ssl](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl) |
| [@vitejs/plugin-legacy](https://www.npmjs.com/package/@vitejs/plugin-legacy) | 无须使用,详见 [浏览器兼容性](/guide/advanced/browser-compatibility) |
Expand Down
Loading

0 comments on commit fce3931

Please sign in to comment.