File tree Expand file tree Collapse file tree 1 file changed +92
-0
lines changed Expand file tree Collapse file tree 1 file changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,98 @@ Transform Vue 3 SFC to JavaScript.
1212- 🔄 Sync code from [ @vitejs/plugin-vue ] ( https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue ) periodically.
1313 Currently based on [ @vitejs/plugin-vue @5.2.3] ( https://github.com/vitejs/vite-plugin-vue/tree/plugin-vue@5.2.3/packages/plugin-vue ) .
1414
15+ ## Installation
16+
17+ ``` bash
18+ npm i -D unplugin-vue
19+ ```
20+
21+ <details >
22+ <summary >Vite</summary ><br >
23+
24+ ``` ts
25+ // vite.config.ts
26+ import Vue from ' unplugin-vue/vite'
27+
28+ export default defineConfig ({
29+ plugins: [Vue ()],
30+ })
31+ ```
32+
33+ <br ></details >
34+
35+ <details >
36+ <summary >Rollup</summary ><br >
37+
38+ ``` ts
39+ // rollup.config.js
40+ import Vue from ' unplugin-vue/rollup'
41+
42+ export default {
43+ plugins: [Vue ()],
44+ }
45+ ```
46+
47+ <br ></details >
48+
49+ <details >
50+ <summary >Rolldown</summary ><br >
51+
52+ ``` ts
53+ // rolldown.config.js
54+ import Vue from ' unplugin-vue/rolldown'
55+
56+ export default {
57+ plugins: [Vue ()],
58+ }
59+ ```
60+
61+ <br ></details >
62+
63+ <details >
64+ <summary >esbuild</summary ><br >
65+
66+ ``` ts
67+ import { build } from ' esbuild'
68+ import Vue from ' unplugin-vue/esbuild'
69+
70+ build ({
71+ plugins: [Vue ()],
72+ })
73+ ```
74+
75+ <br ></details >
76+
77+ <details >
78+ <summary >Webpack</summary ><br >
79+
80+ ``` js
81+ // webpack.config.js
82+ import Vue from ' unplugin-vue/webpack'
83+
84+ export default {
85+ /* ... */
86+ plugins: [Vue ()],
87+ }
88+ ```
89+
90+ <br ></details >
91+
92+ <details >
93+ <summary >Rspack</summary ><br >
94+
95+ ``` ts
96+ // rspack.config.js
97+ import Vue from ' unplugin-vue/rspack'
98+
99+ export default {
100+ /* ... */
101+ plugins: [Vue ()],
102+ }
103+ ```
104+
105+ <br ></details >
106+
15107### Limitations
16108
17109⚠️ HMR is not supported for Webpack, Vue CLI, and Rspack.
You can’t perform that action at this time.
0 commit comments