Skip to content

Commit 95c2661

Browse files
author
Søren Brokær
committed
Add support for React 0.13.x as they provide the hash map directly instead of having to jsonify the mapping
1 parent c8afc24 commit 95c2661

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

jsx.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ define(function () {
5656

5757
content = transform.code;
5858

59-
if (options.inlineSourceMap && transform.sourceMap && typeof transform.sourceMap.toJSON === 'function') {
60-
var sourceMap = transform.sourceMap.toJSON();
59+
if (options.inlineSourceMap && transform.sourceMap) {
60+
var sourceMap = transform.sourceMap;
61+
62+
if (typeof transform.sourceMap.toJSON === 'function') {
63+
sourceMap = transform.sourceMap.toJSON();
64+
}
65+
6166
sourceMap.file = name;
6267
sourceMap.sources[0] = config.baseUrl + name;
6368

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "requirejs-react-jsx",
3-
"version": "0.12.3",
3+
"version": "0.13.1",
44
"description": "A RequireJS plugin for loading jsx in require.js and r.js",
55
"main": "jsx.js",
66
"scripts": {

0 commit comments

Comments
 (0)