Skip to content

Commit

Permalink
fix: improve ESM detection
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Mar 5, 2024
1 parent 2479fbc commit 1332a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function isGlobalScript(js: string) {
}

function isEsmScript(js: string) {
return js.includes('_scriptDir = import.meta.url')
return js.includes('import.meta.url')
}

function patchCoreJs({ name, js }: { name: string; js: string }) {
Expand Down

0 comments on commit 1332a03

Please sign in to comment.