Skip to content

Commit

Permalink
refactor: limit passable compilerOptions (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Aug 31, 2022
1 parent 460fb4a commit 79fb291
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
16 changes: 13 additions & 3 deletions README.md
Expand Up @@ -21,9 +21,19 @@ export interface Options {
isProduction?: boolean

// options to pass on to vue/compiler-sfc
script?: Partial<SFCScriptCompileOptions>
template?: Partial<SFCTemplateCompileOptions>
style?: Partial<SFCStyleCompileOptions>
script?: Partial<Pick<SFCScriptCompileOptions, 'babelParserPlugins'>>
template?: Partial<
Pick<
SFCTemplateCompileOptions,
| 'compiler'
| 'compilerOptions'
| 'preprocessOptions'
| 'transpileOptions'
| 'transformAssetUrls'
| 'transformAssetUrlsOptions'
>
>
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>
}
```

Expand Down
16 changes: 13 additions & 3 deletions src/index.ts
Expand Up @@ -29,9 +29,19 @@ export interface Options {
isProduction?: boolean

// options to pass on to vue/compiler-sfc
script?: Partial<SFCScriptCompileOptions>
template?: Partial<SFCTemplateCompileOptions>
style?: Partial<SFCStyleCompileOptions>
script?: Partial<Pick<SFCScriptCompileOptions, 'babelParserPlugins'>>
template?: Partial<
Pick<
SFCTemplateCompileOptions,
| 'compiler'
| 'compilerOptions'
| 'preprocessOptions'
| 'transpileOptions'
| 'transformAssetUrls'
| 'transformAssetUrlsOptions'
>
>
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>

// customElement?: boolean | string | RegExp | (string | RegExp)[]
// reactivityTransform?: boolean | string | RegExp | (string | RegExp)[]
Expand Down

0 comments on commit 79fb291

Please sign in to comment.