File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/core/src/compiler Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import vueJsxPlugin from '@vue/babel-plugin-jsx'
6
6
import typescriptPlugin from '@babel/plugin-transform-typescript'
7
7
import importMeta from '@babel/plugin-syntax-import-meta'
8
8
import { parseJSXIdentifier } from '../utils'
9
+ import { normalizePath } from 'vite'
9
10
10
11
const EXCLUDE_TAG = [ 'template' , 'script' , 'style' ]
11
12
const KEY_DATA = 'data-v-inspector'
@@ -19,7 +20,7 @@ export async function compileSFCTemplate(
19
20
{ code, id, type } : CompileSFCTemplateOptions ,
20
21
) {
21
22
const s = new MagicString ( code )
22
- const relativePath = path . relative ( process . cwd ( ) , id )
23
+ const relativePath = normalizePath ( path . relative ( process . cwd ( ) , id ) )
23
24
const result = await new Promise ( ( resolve ) => {
24
25
switch ( type ) {
25
26
case 'template' : {
You can’t perform that action at this time.
0 commit comments