Skip to content

Commit

Permalink
fix: passthrough vue options
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 7, 2023
1 parent f16ae87 commit 3ccd0ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/configs/vue.ts
Expand Up @@ -4,7 +4,7 @@ import type { FlatConfigItem, OptionsFiles, OptionsHasTypeScript, OptionsOverrid
import { GLOB_VUE } from '../globs'

export async function vue(
options: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles & OptionsVue = {},
options: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles = {},
): Promise<FlatConfigItem[]> {
const {
files = [GLOB_VUE],
Expand Down Expand Up @@ -62,8 +62,8 @@ export async function vue(
processorVueBlocks({
...sfcBlocks,
blocks: {
...sfcBlocks.blocks,
styles: true,
...sfcBlocks.blocks,
},
}),
]),
Expand Down
3 changes: 3 additions & 0 deletions src/factory.ts
Expand Up @@ -128,6 +128,9 @@ export async function antfu(

if (enableVue) {
configs.push(vue({
...typeof enableVue !== 'boolean'
? enableVue
: {},
overrides: overrides.vue,
stylistic: stylisticOptions,
typescript: !!enableTypeScript,
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Expand Up @@ -245,7 +245,7 @@ export interface OptionsConfig extends OptionsComponentExts {
*
* @default auto-detect based on the dependencies
*/
vue?: boolean
vue?: boolean | OptionsVue

/**
* Enable JSONC support.
Expand Down

0 comments on commit 3ccd0ae

Please sign in to comment.