mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(rollup): dirnames not generate a sourcemap for the transformation (#83)
This commit is contained in:
parent
fff38618fe
commit
2d0ff10892
@ -49,7 +49,10 @@ export function dirnames (): Plugin {
|
|||||||
return {
|
return {
|
||||||
name: 'dirnames',
|
name: 'dirnames',
|
||||||
renderChunk (code, chunk) {
|
renderChunk (code, chunk) {
|
||||||
return code + (chunk.isEntry ? 'global.mainDir="undefined"!=typeof __dirname?__dirname:require.main.filename;' : '')
|
return {
|
||||||
|
code: code + (chunk.isEntry ? 'global.mainDir="undefined"!=typeof __dirname?__dirname:require.main.filename;' : ''),
|
||||||
|
map: null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user