You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rslib and Rsbuild share the same plugin system, so you can use Rsbuild plugins in Rslib.
8
+
9
+
:::tip
10
+
Currently, some plugins have not been adapted to the [bundleless](/guide/basic/output-structure#bundle--bundleless) mode of Rslib, such as the Vue plugin and Svelte plugin. Therefore, these plugins can only be used in the bundle mode.
11
+
:::
12
+
13
+
## Using Plugins
14
+
15
+
You can register Rsbuild plugins in `rslib.config.*` using the `plugins` option, see [Rsbuild - plugins](https://rsbuild.dev/config/plugins).
The following are official plugins that can be used in Rsbuild, and applicable to Rslib.
10
29
11
30
### For React
12
31
13
-
Plugins available for the React framework:
32
+
Plugins available for React:
14
33
15
34
-[React Plugin](https://rsbuild.dev/plugins/list/plugin-react): Provides support for React.
16
35
-[SVGR Plugin](https://rsbuild.dev/plugins/list/plugin-svgr): Support convert SVG to React components.
17
36
-[Styled Components Plugin](https://github.com/rsbuild-contrib/rsbuild-plugin-styled-components): Provide compile-time support for styled-components.
18
37
19
-
{/*### For Vue*/}
38
+
### For Vue
20
39
21
-
{/*Plugins available for the Vue framework: */}
40
+
Plugins available for Vue:
22
41
23
-
{/*- [Vue Plugin](https://rsbuild.dev/plugins/list/plugin-vue): Provides support for Vue 3 SFC (Single File Components).*/}
24
-
{/*- [Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.*/}
25
-
{/*- [Vue2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2): Provides support for Vue 2 SFC (Single File Components).*/}
26
-
{/*- [Vue2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx): Provides support for Vue 2 JSX / TSX syntax.*/}
42
+
-[Vue Plugin](https://rsbuild.dev/plugins/list/plugin-vue): Provides support for Vue 3 SFC (Single File Components).
43
+
-[Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.
44
+
-[Vue2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2): Provides support for Vue 2 SFC (Single File Components).
45
+
-[Vue2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx): Provides support for Vue 2 JSX / TSX syntax.
27
46
28
47
### For Preact
29
48
30
-
Plugins available for the Preact framework:
49
+
Plugins available for Preact:
31
50
32
51
-[Preact Plugin](https://rsbuild.dev/plugins/list/plugin-preact): Provides support for Preact.
33
52
34
-
{/*### For Svelte*/}
53
+
### For Svelte
35
54
36
-
{/*Plugins available for the Svelte framework: */}
55
+
Plugins available for Svelte:
37
56
38
-
{/*- [Svelte Plugin](https://rsbuild.dev/plugins/list/plugin-svelte): Provides support for Svelte components (`.svelte` files).*/}
57
+
-[Svelte Plugin](https://rsbuild.dev/plugins/list/plugin-svelte): Provides support for Svelte components (`.svelte` files).
39
58
40
-
{/*### For Solid*/}
59
+
### For Solid
41
60
42
-
{/*Plugins available for the Solid framework: */}
61
+
Plugins available for Solid:
43
62
44
-
{/*- [Solid Plugin](https://rsbuild.dev/plugins/list/plugin-solid): Provides support for Solid.*/}
63
+
-[Solid Plugin](https://rsbuild.dev/plugins/list/plugin-solid): Provides support for Solid.
45
64
46
65
### Common
47
66
48
67
The following are common framework-agnostic plugins:
49
68
50
-
{/* - [Assets Retry Plugin](https://rsbuild.dev/plugins/list/plugin-assets-retry): Used to automatically resend requests when static assets fail to load. */}
51
-
52
69
-[Babel Plugin](https://rsbuild.dev/plugins/list/plugin-babel): Provides support for Babel transpilation capabilities.
53
70
-[Sass Plugin](https://rsbuild.dev/plugins/list/plugin-sass): Use Sass as the CSS preprocessor.
54
71
-[Less Plugin](https://rsbuild.dev/plugins/list/plugin-less): Use Less as the CSS preprocessor.
55
72
-[Stylus Plugin](https://rsbuild.dev/plugins/list/plugin-stylus): Use Stylus as the CSS preprocessor.
56
-
{/* - [Basic SSL Plugin](https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl): Generate an untrusted, self-signed certificate for the HTTPS server. */}
57
73
-[ESLint Plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint): Run ESLint checks during the compilation.
58
74
-[Type Check Plugin](https://github.com/rspack-contrib/rsbuild-plugin-type-check): Run TypeScript type checker on a separate process.
59
75
-[Image Compress Plugin](https://github.com/rspack-contrib/rsbuild-plugin-image-compress): Compress the image assets.
0 commit comments