Skip to content

Commit

Permalink
fix: normalize importer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Jul 28, 2022
1 parent 73a6630 commit 91cda6d
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1,5 +1,6 @@
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { normalizePath } from 'vite'
import { describe, expect, it } from 'vitest'
import { transformDynamicImport } from '../../../plugins/dynamicImportVars'

Expand All @@ -9,7 +10,7 @@ async function run(input: string) {
const { glob, rawPattern } =
(await transformDynamicImport(
input,
resolve(__dirname, 'index.js'),
normalizePath(resolve(__dirname, 'index.js')),
(id) => id.replace('@', resolve(__dirname, './mods/')),
__dirname
)) || {}
Expand Down

0 comments on commit 91cda6d

Please sign in to comment.