From a55eebc4eec56f01c18ee14f49c8a0acf5f56660 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 3 Jan 2021 22:43:28 -0500 Subject: [PATCH] docs(plugin-vue): example for passing compiler options close #1312 --- packages/plugin-vue/README.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index 47349b26..728154da 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -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 = { @@ -52,8 +69,8 @@ const vueI18nPlugin = { export default { plugins: [vue(), vueI18nPlugin] } -``` +``` ## License -MIT \ No newline at end of file +MIT