mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
fix(nitro): inject entryURL at beginning of entrypoint (#468)
This commit is contained in:
parent
7f9ef5e13d
commit
7527d30bed
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user