File tree 1 file changed +2
-2
lines changed
packages/plugin-vue/src/utils
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
import fs from 'node:fs'
2
2
import path from 'node:path'
3
3
import { createHash } from 'node:crypto'
4
- import slash from 'slash'
5
4
import type { CompilerError , SFCDescriptor } from 'vue/compiler-sfc'
5
+ import { normalizePath } from 'vite'
6
6
import type { ResolvedOptions , VueQuery } from '..'
7
7
8
8
// compiler-sfc should be exported so it can be re-used
@@ -33,7 +33,7 @@ export function createDescriptor(
33
33
34
34
// ensure the path is normalized in a way that is consistent inside
35
35
// project (relative to root) and on different systems.
36
- const normalizedPath = slash ( path . normalize ( path . relative ( root , filename ) ) )
36
+ const normalizedPath = normalizePath ( path . relative ( root , filename ) )
37
37
descriptor . id = getHash ( normalizedPath + ( isProduction ? source : '' ) )
38
38
; ( hmr ? hmrCache : cache ) . set ( filename , descriptor )
39
39
return { descriptor, errors }
You can’t perform that action at this time.
0 commit comments