Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate sourcemap into a separate file #717

Closed
marvinhagemeister opened this issue Jun 12, 2016 · 1 comment
Closed

Unable to generate sourcemap into a separate file #717

marvinhagemeister opened this issue Jun 12, 2016 · 1 comment

Comments

@marvinhagemeister
Copy link

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

@Rich-Harris
Copy link
Contributor

This is fixed in 0.31.2 – thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants