fix(build): switch to cjs output for es5.

System output does not work at the current versions of TS and
system.js. Will revisit after upgrading TS.

Removes unused traceur tooling.

Closes #3974
This commit is contained in:
Rado Kirov
2015-09-02 20:58:02 -07:00
committed by Rado Kirov
parent b025f94351
commit e9ad100b1f
39 changed files with 25 additions and 1243 deletions

View File

@ -16,7 +16,12 @@ export function evalModule(moduleSource: string, moduleImports: string[][], args
var modName = sourceImport[0];
var modAlias = sourceImport[1];
importModuleNames.push(modName);
moduleSourceWithImports.push(`var ${modAlias} = require('${modName}');`);
// Note: After transpilation to commonJS and loading this file in a browser
// using SystemJS, the loader might get confused by the presence of require,
// and attempt to load "+ modName +.js" !?!
// A simple string concat manages to prevent that, but that is one compiler
// optimaztion away from breaking again. Proceed with caution!
moduleSourceWithImports.push(`var ${modAlias} = require` + `('${modName}');`);
});
moduleSourceWithImports.push(moduleSource);