Skip to content

Commit

Permalink
fix: revert \0 prefix to fix hmr
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 16, 2023
1 parent d75d468 commit cd8b4be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/shared-integration/src/layers.ts
Expand Up @@ -3,8 +3,8 @@ export const VIRTUAL_ENTRY_ALIAS = [
]
export const LAYER_MARK_ALL = '__ALL__'

export const RESOLVED_ID_WITH_QUERY_RE = /\0?[\/\\]__uno(?:(_.*?))?\.css(\?.*)?$/
export const RESOLVED_ID_RE = /\0?[\/\\]__uno(?:(_.*?))?\.css$/
export const RESOLVED_ID_WITH_QUERY_RE = /[\/\\]__uno(?:(_.*?))?\.css(\?.*)?$/
export const RESOLVED_ID_RE = /[\/\\]__uno(?:(_.*?))?\.css$/

export function resolveId(id: string) {
if (id.match(RESOLVED_ID_WITH_QUERY_RE))
Expand All @@ -14,8 +14,8 @@ export function resolveId(id: string) {
const match = id.match(alias)
if (match) {
return match[1]
? `\0/__uno_${match[1]}.css`
: '\0/__uno.css'
? `/__uno_${match[1]}.css`
: '/__uno.css'
}
}
}
Expand Down

0 comments on commit cd8b4be

Please sign in to comment.