Skip to content

Commit

Permalink
fix: window
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed May 9, 2022
1 parent 07c2f8f commit 5d11b74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/dynamicImportVars.ts
Expand Up @@ -83,8 +83,8 @@ export async function transformDynamicImport(
return null
}
const relativeFileName = posix.relative(
posix.dirname(importer),
resolvedFileName
posix.dirname(normalizePath(importer)),
normalizePath(resolvedFileName)
)
importSource = normalizePath(
'`' + (relativeFileName[0] === '.' ? '' : './') + relativeFileName + '`'
Expand Down

0 comments on commit 5d11b74

Please sign in to comment.