Skip to content
This repository has been archived by the owner on Nov 10, 2019. It is now read-only.

generateSourceMaps adds two sourceMappingURL #17

Open
rockResolve opened this issue May 8, 2015 · 1 comment
Open

generateSourceMaps adds two sourceMappingURL #17

rockResolve opened this issue May 8, 2015 · 1 comment

Comments

@rockResolve
Copy link
Contributor

Reinstalling gulp-durandal and using generateSourceMaps I got two sourceMappingURLs, the first one bogus. When compilng main I got:

 //# sourceMappingURL=main-built.js
 //# sourceMappingURL="my real output filename".map

I tracked it down to an update of RequireJs to version 2.4.16.
Raised issue requirejs/r.js#802

Depending on the fix, the rjsConfig.out function rjsCb could be replaced by just options.output string.

Work around

In gulp-durandal index.js rjsCb function

        if (sourceMapText) {
            //Awaiting fix of https://github.com/jrburke/r.js/issues/802
            text = text.replace(/\n\/\/# sourceMappingURL=.+?$/, '');

            text += '//# sourceMappingURL=' + path.basename(mapOutput);
        }
@spikyturtle
Copy link

I was having the same problem. Thanks @rockResolve for the work around.

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

No branches or pull requests

2 participants