Skip to content

Commit 744abb7

Browse files
committed
transpiler tweaks
1 parent 8a688f7 commit 744abb7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22
-----------
33

4-
Copyright (C) 2013-2015 Guy Bedford
4+
Copyright (C) 2013-2016 Guy Bedford
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77

lib/esm.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// do checks for setting transpiler metadata
3232
loader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
3333
if (loader.pluginLoader)
34-
loader.pluginLoader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false; // builder support
34+
loader.pluginLoader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
3535

3636
// do transpilation
3737
return (loader._loader.transpilerPromise || (
@@ -42,6 +42,10 @@
4242

4343
// translate hooks means this is a transpiler plugin instead of a raw implementation
4444
if (transpiler.translate) {
45+
// if transpiler is the same as the plugin loader, then don't run twice
46+
if (transpiler == load.metadata.loaderModule)
47+
return load.source;
48+
4549
return Promise.resolve(transpiler.translate.call(loader, load))
4650
.then(function(source) {
4751
if (load.metadata.format == 'esm' && !loader.builder && detectRegisterFormat(source))

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"devDependencies": {
1616
"babel-core": "^5.8.22",
1717
"qunit": "^0.6.2",
18-
"traceur": "0.0.91",
18+
"traceur": "0.0.95",
1919
"typescript": "^1.6.2",
2020
"uglify-js": "~2.4.23"
2121
},

0 commit comments

Comments
 (0)