- Rollup Version: 2.35.1
- Operating System (or Browser): macOS 10.15.7
- Node Version (if applicable): v14.5.0
const bundle = await rollup.rollup({
input: filePath,
})
const { output } = await bundle.generate({
format: 'iife',
sourcemap: 'inline'
})
console.log(output[0].code) // Expect sourcemap to be part of the code (= inline)
console.log(output[0].map) // Sourcemap is only available via .map
See https://repl.it/@electerious/rollup-repro#index.js (run with node index.js)
Expected Behavior
I'm using the API and passing the sourcemap: 'inline' option to Rollup (output options). I've expected that the sourcemap is inline and therefore a part of output[0].code.
Actual Behavior
The sourcemap is only available via output[0].map, but not part of output[0].code.
That might be the correct behaviour when using the API, but there's nothing in the docs telling me that 'inline' won't work when using the API.
See https://repl.it/@electerious/rollup-repro#index.js (run with
node index.js)Expected Behavior
I'm using the API and passing the
sourcemap: 'inline'option to Rollup (output options). I've expected that the sourcemap is inline and therefore a part ofoutput[0].code.Actual Behavior
The sourcemap is only available via
output[0].map, but not part ofoutput[0].code.That might be the correct behaviour when using the API, but there's nothing in the docs telling me that 'inline' won't work when using the API.