From 9c2a9588beac4c9418dc915c9ba8ee6fd9a7d8e8 Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Fri, 22 Jul 2022 00:14:45 +0900 Subject: [PATCH 1/2] refactor: limit passable compilerOptions --- README.md | 17 ++++++++++++++--- src/index.ts | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e8c5637..7dd215a 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,20 @@ export interface Options { isProduction?: boolean // options to pass on to vue/compiler-sfc - script?: Partial - template?: Partial - style?: Partial + script?: Partial> + template?: Partial< + Pick< + SFCTemplateCompileOptions, + | 'compiler' + | 'compilerOptions' + | 'preprocessOptions' + | 'transpileOptions' + | 'transformAssetUrls' + | 'transformAssetUrlsOptions' + | 'isTS' + > + > + style?: Partial> } ``` diff --git a/src/index.ts b/src/index.ts index 6a78789..614a810 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,9 +29,20 @@ export interface Options { isProduction?: boolean // options to pass on to vue/compiler-sfc - script?: Partial - template?: Partial - style?: Partial + script?: Partial> + template?: Partial< + Pick< + SFCTemplateCompileOptions, + | 'compiler' + | 'compilerOptions' + | 'preprocessOptions' + | 'transpileOptions' + | 'transformAssetUrls' + | 'transformAssetUrlsOptions' + | 'isTS' + > + > + style?: Partial> // customElement?: boolean | string | RegExp | (string | RegExp)[] // reactivityTransform?: boolean | string | RegExp | (string | RegExp)[] From 21c57c3669c9be2a7fcb2a20a850dfd72c50669c Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Wed, 31 Aug 2022 17:08:29 +0900 Subject: [PATCH 2/2] refactor: remove isTS --- README.md | 1 - src/index.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 7dd215a..99ba3bf 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ export interface Options { | 'transpileOptions' | 'transformAssetUrls' | 'transformAssetUrlsOptions' - | 'isTS' > > style?: Partial> diff --git a/src/index.ts b/src/index.ts index 614a810..95336b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,7 +39,6 @@ export interface Options { | 'transpileOptions' | 'transformAssetUrls' | 'transformAssetUrlsOptions' - | 'isTS' > > style?: Partial>