Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 686823d

Browse files
committed
Merge pull request #410 from toddwong/master
Restrict scopes of __moduleName
2 parents 390585b + 23cdde5 commit 686823d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transpiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var transpile = (function() {
2424
transpileFunction = babelTranspile;
2525

2626
// note __moduleName will be part of the transformer meta in future when we have the spec for this
27-
return 'var __moduleName = "' + load.name + '";' + transpileFunction.call(self, load, transpiler) + '\n//# sourceURL=' + load.address + '!transpiled';
27+
return '(function(__moduleName){' + transpileFunction.call(self, load, transpiler) + '\n})("' + load.name + '");\n//# sourceURL=' + load.address + '!transpiled';
2828
});
2929
};
3030

0 commit comments

Comments
 (0)