Skip to content

Commit a55eebc

Browse files
committed
docs(plugin-vue): example for passing compiler options
close #1312
1 parent c21710a commit a55eebc

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

packages/plugin-vue/README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,27 @@ export interface Options {
2828
}
2929
```
3030

31+
## Exmaple for passing options to `@vue/compiler-dom`:
32+
33+
```ts
34+
import vue from '@vitejs/plugin-vue'
35+
36+
export default {
37+
plugins: [
38+
vue({
39+
template: {
40+
compilerOptions: {
41+
// ...
42+
}
43+
}
44+
})
45+
]
46+
}
47+
```
48+
3149
## Example for transforming custom blocks
3250

3351
```ts
34-
// vite.config.js
3552
import vue from '@vitejs/plugin-vue'
3653

3754
const vueI18nPlugin = {
@@ -52,8 +69,8 @@ const vueI18nPlugin = {
5269
export default {
5370
plugins: [vue(), vueI18nPlugin]
5471
}
55-
```
72+
```
5673

5774
## License
5875

59-
MIT
76+
MIT

0 commit comments

Comments
 (0)