Skip to content

Commit

Permalink
fix(nitro): inject entryURL at beginning of entrypoint (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Sep 3, 2021
1 parent 584a14d commit cb3affa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rollup/plugins/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function dirnames (): Plugin {
name: 'dirnames',
renderChunk (code, chunk) {
return {
code: code + (chunk.isEntry ? 'globalThis.entryURL = import.meta.url' : ''),
code: (chunk.isEntry ? 'globalThis.entryURL = import.meta.url;' : '') + code,
map: null
}
}
Expand Down

0 comments on commit cb3affa

Please sign in to comment.