Skip to content

Commit

Permalink
fix(vscode): path resolve on filesystem config (#3376)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
gnimmelf and antfu committed Nov 29, 2023
1 parent 62f64d0 commit efe4f5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/shared-integration/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export function createContext<Config extends UserConfig<any> = UserConfig<any>>(
let rawConfig = {} as Config
let configFileList: string[] = []
const uno = createGenerator(rawConfig, defaults)
let rollupFilter = createFilter(defaultPipelineInclude, defaultPipelineExclude)
let rollupFilter = createFilter(
defaultPipelineInclude,
defaultPipelineExclude,
{ resolve: typeof configOrPath === 'string' ? configOrPath : root },
)

const invalidations: Array<() => void> = []
const reloadListeners: Array<() => void> = []
Expand All @@ -44,6 +48,7 @@ export function createContext<Config extends UserConfig<any> = UserConfig<any>>(
: createFilter(
rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
{ resolve: typeof configOrPath === 'string' ? configOrPath : root },
)
tokens.clear()
await Promise.all(modules.map((code, id) => uno.applyExtractors(code.replace(SKIP_COMMENT_RE, ''), id, tokens)))
Expand Down

0 comments on commit efe4f5a

Please sign in to comment.