Skip to content

Commit 0c7432b

Browse files
committedFeb 9, 2024
types: omit overridden options
1 parent 0ff6fb7 commit 0c7432b

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed
 

‎packages/plugin-vue/src/index.ts

+37-13
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@ export interface Options {
3737

3838
// options to pass on to vue/compiler-sfc
3939
script?: Partial<
40-
Pick<
40+
Omit<
4141
SFCScriptCompileOptions,
42-
| 'babelParserPlugins'
43-
| 'globalTypeFiles'
44-
| 'propsDestructure'
45-
| 'fs'
46-
| 'hoistStatic'
42+
| 'id'
43+
| 'isProd'
44+
| 'inlineTemplate'
45+
| 'templateOptions'
46+
| 'sourceMap'
47+
| 'genDefaultAs'
48+
| 'customElement'
49+
| 'defineModel'
4750
>
4851
> & {
4952
/**
@@ -53,17 +56,38 @@ export interface Options {
5356
defineModel?: boolean
5457
}
5558
template?: Partial<
56-
Pick<
59+
Omit<
5760
SFCTemplateCompileOptions,
58-
| 'compiler'
59-
| 'compilerOptions'
60-
| 'preprocessOptions'
61+
| 'id'
62+
| 'source'
63+
| 'ast'
64+
| 'filename'
65+
| 'scoped'
66+
| 'slotted'
67+
| 'isProd'
68+
| 'inMap'
69+
| 'ssr'
70+
| 'ssrCssVars'
71+
| 'preprocessLang'
72+
>
73+
>
74+
style?: Partial<
75+
Omit<
76+
SFCStyleCompileOptions,
77+
| 'filename'
78+
| 'id'
79+
| 'isProd'
80+
| 'source'
81+
| 'scoped'
82+
| 'cssDevSourcemap'
83+
| 'postcssOptions'
84+
| 'map'
85+
| 'postcssPlugins'
6186
| 'preprocessCustomRequire'
62-
| 'transformAssetUrls'
87+
| 'preprocessLang'
88+
| 'preprocessOptions'
6389
>
6490
>
65-
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>
66-
6791
/**
6892
* Transform Vue SFCs into custom elements.
6993
* - `true`: all `*.vue` imports are converted into custom elements

0 commit comments

Comments
 (0)
Please sign in to comment.