From 23d79b860ff295075fa1f62919c38471767c9d19 Mon Sep 17 00:00:00 2001 From: TJ Koblentz Date: Tue, 29 Nov 2022 14:52:22 -0800 Subject: [PATCH] docs(plugin-vue): update options in README (#11125) --- packages/plugin-vue/README.md | 45 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index 30e2cd6ceb0399..776828f8cdc96e 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -20,45 +20,48 @@ export interface Options { include?: string | RegExp | (string | RegExp)[] exclude?: string | RegExp | (string | RegExp)[] - ssr?: boolean isProduction?: boolean + // options to pass on to vue/compiler-sfc + script?: Partial> + template?: Partial< + Pick< + SFCTemplateCompileOptions, + | 'compiler' + | 'compilerOptions' + | 'preprocessOptions' + | 'preprocessCustomRequire' + | 'transformAssetUrls' + > + > + style?: Partial> + /** - * Transform Vue SFCs into custom elements (requires vue@^3.2.0) - * - `true` -> all `*.vue` imports are converted into custom elements - * - `string | RegExp` -> matched files are converted into custom elements + * Transform Vue SFCs into custom elements. + * - `true`: all `*.vue` imports are converted into custom elements + * - `string | RegExp`: matched files are converted into custom elements * * @default /\.ce\.vue$/ */ customElement?: boolean | string | RegExp | (string | RegExp)[] /** - * Enable Vue reactivity transform (experimental, requires vue@^3.2.25). - * https://github.com/vuejs/core/tree/master/packages/reactivity-transform - * + * Enable Vue reactivity transform (experimental). + * https://vuejs.org/guide/extras/reactivity-transform.html * - `true`: transform will be enabled for all vue,js(x),ts(x) files except * those inside node_modules * - `string | RegExp`: apply to vue + only matched files (will include - * node_modules, so specify directories in necessary) + * node_modules, so specify directories if necessary) * - `false`: disable in all cases * * @default false */ reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] - // options to pass on to vue/compiler-sfc - script?: Partial> - template?: Partial< - Pick< - SFCTemplateCompileOptions, - | 'compiler' - | 'compilerOptions' - | 'preprocessOptions' - | 'preprocessCustomRequire' - | 'transformAssetUrls' - > - > - style?: Partial> + /** + * Use custom compiler-sfc instance. Can be used to force a specific version. + */ + compiler?: typeof _compiler } ```