File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/plugin-vue/src/utils Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import fs from 'node:fs'
22import path from 'node:path'
33import { createHash } from 'node:crypto'
4- import slash from 'slash'
54import type { CompilerError , SFCDescriptor } from 'vue/compiler-sfc'
5+ import { normalizePath } from 'vite'
66import type { ResolvedOptions , VueQuery } from '..'
77
88// compiler-sfc should be exported so it can be re-used
@@ -33,7 +33,7 @@ export function createDescriptor(
3333
3434 // ensure the path is normalized in a way that is consistent inside
3535 // 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 ) )
3737 descriptor . id = getHash ( normalizedPath + ( isProduction ? source : '' ) )
3838 ; ( hmr ? hmrCache : cache ) . set ( filename , descriptor )
3939 return { descriptor, errors }
You can’t perform that action at this time.
0 commit comments