I'm unable to generate sourcemap files which are not inline. Setting the sourceMapFile key inside the config (according to the wiki) leads to an error:
// rollup.config.js
export default {
entry: 'src/main.js',
format: 'iife',
moduleName: 'RollupTest',
dest: 'dist/bundle.js',
sourceMap: true,
sourceMapFile: 'dist/bundle.js.map',
...
}
Unexpected key 'sourceMapFile' found, expected one of: acorn, banner, cache, dest, entry, exports, external, footer, format, globals, indent, intro, moduleId, moduleName, noConflict, onwarn, outro, plugins, preferConst, sourceMap, targets, treeshake, useStrict
// src/main.js
var foo = 42;
function main() {
console.log(foo);
return foo;
}
function woa() {
return 5;
}
export default main;
Without sourceMapFile I'm able to bundle the above file with the folllowing output:
var RollupTest = (function () {
'use strict';
var foo = 42;
function main() {
console.log(foo);
return foo;
}
return main;
}());
//# sourceMappingURL=bundle.js.map
But the bundle.js.map itself is missing. No sourcemaps are rendered.
The command rollup -m inline writes the sourcemap correctly into bundle.js
I'm unable to generate sourcemap files which are not inline. Setting the
sourceMapFilekey inside the config (according to the wiki) leads to an error:Without
sourceMapFileI'm able to bundle the above file with the folllowing output:But the bundle.js.map itself is missing. No sourcemaps are rendered.
The command
rollup -m inlinewrites the sourcemap correctly into bundle.js