Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vscode): windows pathe format #1645

Merged
merged 2 commits into from Sep 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/vscode/src/contextLoader.ts
Expand Up @@ -5,6 +5,7 @@ import type { UnocssPluginContext, UserConfig, UserConfigDefaults } from '@unocs
import { notNull } from '@unocss/core'
import { sourceObjectFields, sourcePluginFactory } from 'unconfig/presets'
import presetUno from '@unocss/preset-uno'
import { normalizePath } from 'vite'
import { resolveOptions as resolveNuxtOptions } from '../../nuxt/src/options'
import { createNanoEvents } from '../../core/src/utils/events'
import { createContext, isCssId } from './integration'
Expand Down Expand Up @@ -135,7 +136,7 @@ export class ContextLoader {
return null

const baseDir = dirname(sources[0])
if (baseDir !== dir) {
if (baseDir !== normalizePath(dir)) {
// exists on upper level, skip
this.contextsMap.set(dir, null)
return null
Expand Down