Skip to content

Commit

Permalink
fix(unplugin): A type error. Unplugin options now support async funct…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
s3xysteak committed Mar 29, 2024
1 parent a53f0ad commit 1aa4894
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/unplugin.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import process from 'node:process'
import { createUnplugin } from 'unplugin'
import { resolve } from 'pathe'
import { type Callable, toPromise } from '@s3xysteak/utils'
import { type Awaitable, type Callable, toPromise } from '@s3xysteak/utils'
import { addExtension } from './utils'
import { type ExpGeneratorOptions, expGenerator } from './generator'

export interface UnpluginFactoryOptions extends ExpGeneratorOptions {
entries: string[]
}

export default createUnplugin<Callable<Partial<UnpluginFactoryOptions>> | undefined>((options = {}) => {
export default createUnplugin<Callable<Awaitable<Partial<UnpluginFactoryOptions>>> | undefined>((options = {}) => {
return {
name: 'unplugin-auto-import-generator',
async buildStart() {
Expand Down

0 comments on commit 1aa4894

Please sign in to comment.