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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user