Using SystemJS in production without Traceur

I want to use SystemJS to dynamically import AMD modules, as well as System.import() modules as needed. I can, of course, enable <script src="system.js"></script> , but I get an error that Traceur is not defined. I intentionally do not want to include Traceur or any other dependencies in order to minimize queries. Is there a version of SystemJS that allows you to import AMD and System.import calls into one featherweight script?

+8
javascript systemjs
source share
2 answers

From the documentation :

Transparent

Type: String Default: traceur

Represents the module name for System.import, which should allow either Traceur, Babel, or TypeScript.

You need to determine one of the three above, it cannot be disabled.

0
source share

The transpiler parameter in jspm and (provided that it just passed) systemjs can be set to false , although currently [1] SystemJS has a hard-coded dependency on Traceur transpiler when a module in ES6 format is detected.

The reason I mention this is because I believe that your problem is not related to the AMD modules used, but rather that some dependence on the modules you use (or the modules that they use) is actually written in ES6 format. Check the dropdown error message in the browser console.

[1] Link to the source code of SystemJS, which processes the format of the ES6 module .

0
source share

All Articles