Skip to content

Commit

Permalink
docs(plugin-vue): example for passing compiler options
Browse files Browse the repository at this point in the history
close #1312
  • Loading branch information
yyx990803 committed Jan 4, 2021
1 parent c21710a commit a55eebc
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions packages/plugin-vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,27 @@ export interface Options {
}
```

## Exmaple for passing options to `@vue/compiler-dom`:

```ts
import vue from '@vitejs/plugin-vue'

export default {
plugins: [
vue({
template: {
compilerOptions: {
// ...
}
}
})
]
}
```

## Example for transforming custom blocks

```ts
// vite.config.js
import vue from '@vitejs/plugin-vue'

const vueI18nPlugin = {
Expand All @@ -52,8 +69,8 @@ const vueI18nPlugin = {
export default {
plugins: [vue(), vueI18nPlugin]
}
```
```

## License

MIT
MIT

0 comments on commit a55eebc

Please sign in to comment.