Skip to content

Commit

Permalink
refactor: call fetchModule on a transport
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Mar 21, 2024
1 parent df59e59 commit 572ba13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/module-runner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class ModuleRunner {
// fast return for established externalized patterns
const fetchedModule = id.startsWith('data:')
? ({ externalize: id, type: 'builtin' } satisfies FetchResult)
: await this.options.fetchModule(id, importer)
: await this.options.transport.fetchModule(id, importer)
// base moduleId on "file" and not on id
// if `import(variable)` is called it's possible that it doesn't have an extension for example
// if we used id for that, it's possible to have a duplicated module
Expand Down

0 comments on commit 572ba13

Please sign in to comment.