mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +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 {
|
||||
name: 'dirnames',
|
||||
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