Skip to content

Commit

Permalink
create filter
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD authored Aug 4, 2024
1 parent d56cff2 commit a0e6279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { join, resolve } from 'node:path'
import { slash, toArray } from '@antfu/utils'
import { getPackageInfoSync, isPackageExists } from 'local-pkg'
import { createFilter } from '@rollup/pluginutils'
import type { ComponentResolver, ComponentResolverObject, Options, ResolvedOptions } from '../types'
import { detectTypeImports } from './type-imports/detect'

Expand Down Expand Up @@ -34,6 +35,7 @@ export function resolveOptions(options: Options, root: string): ResolvedOptions
const resolved = Object.assign({}, defaultOptions, options) as ResolvedOptions
resolved.resolvers = normalizeResolvers(resolved.resolvers)
resolved.extensions = toArray(resolved.extensions)
resolved.excludeNames = createFilter(resolved.excludeNames)

if (resolved.globs) {
resolved.globs = toArray(resolved.globs).map((glob: string) => slash(resolveGlobsExclude(root, glob)))
Expand Down

0 comments on commit a0e6279

Please sign in to comment.