Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(vue): limit passable compilerOptions (#8994)
  • Loading branch information
sapphi-red committed Jul 15, 2022
1 parent 555deea commit b7b3e65
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions packages/plugin-vue/README.md
Expand Up @@ -45,9 +45,18 @@ export interface Options {
reactivityTransform?: boolean | string | RegExp | (string | RegExp)[]

// 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'
| 'preprocessCustomRequire'
| 'transformAssetUrls'
>
>
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>
}
```

Expand Down
15 changes: 12 additions & 3 deletions packages/plugin-vue/src/index.ts
Expand Up @@ -30,9 +30,18 @@ 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'
| 'preprocessCustomRequire'
| 'transformAssetUrls'
>
>
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>

/**
* Transform Vue SFCs into custom elements.
Expand Down

0 comments on commit b7b3e65

Please sign in to comment.