Skip to content

Commit

Permalink
fix: add scan module type
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Aug 22, 2024
1 parent e08ded5 commit 289c126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ function rolldownScanPlugin(
if (htmlTypesRE.test(id)) {
return {
code: await htmlTypeOnLoadCallback(id),
moduleType: 'js'
}
}

Expand Down Expand Up @@ -607,11 +608,13 @@ function rolldownScanPlugin(

if (contents.includes('import.meta.glob')) {
return {
moduleType: 'js', // since it is transpiled,
code: await doTransformGlobImport(contents, id),
}
}

return {
moduleType: loader,
code: contents,
}
}
Expand Down

0 comments on commit 289c126

Please sign in to comment.