Use //# instead of //@ for sourceMappingURL comment

Summary:
I had an issue debugging in chrome 48 on windows where source maps didn't work. I tried changing the sourceMappingURL comment to use the //# syntax instead and it fixed the problem.

According to https://developers.google.com/web/updates/2013/06/sourceMappingURL-and-sourceURL-syntax-changed?hl=en the //@ syntax was deprecated for //#.
Closes https://github.com/facebook/react-native/pull/4892

Reviewed By: martinbigio

Differential Revision: D2781046

Pulled By: davidaurelio

fb-gh-sync-id: 3b85f6153692a2e23509029ecf18dc51d35ba921
This commit is contained in:
Janic Duplessis 2015-12-23 11:38:02 -08:00 committed by facebook-github-bot-6
parent d1e5fb8144
commit 3872e5fd93
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ const UglifyJS = require('uglify-js');
const ModuleTransport = require('../lib/ModuleTransport');
const Activity = require('../Activity');
const SOURCEMAPPING_URL = '\n\/\/@ sourceMappingURL=';
const SOURCEMAPPING_URL = '\n\/\/# sourceMappingURL=';
const minifyCode = code =>
UglifyJS.minify(code, {fromString: true, ascii_only: true}).code;

View File

@ -43,7 +43,7 @@ describe('Bundle', function() {
expect(bundle.getSource({dev: true})).toBe([
'transformed foo;',
'transformed bar;',
'\/\/@ sourceMappingURL=test_url'
'\/\/# sourceMappingURL=test_url'
].join('\n'));
});
@ -90,7 +90,7 @@ describe('Bundle', function() {
'transformed bar;',
';require("bar");',
';require("foo");',
'\/\/@ sourceMappingURL=test_url',
'\/\/# sourceMappingURL=test_url',
].join('\n'));
});