williamsandonz
williamsandonz

Reputation: 16420

SystemJS import without transpiling

I have a script that I need to import which I cannot have wrapped in a System.register call.

Is it possible to do this?

Thanks.

Upvotes: 1

Views: 373

Answers (2)

Mike Graham
Mike Graham

Reputation: 1044

you can import the script using Globals

systemjs globals

The global format loads globals identically to if they were included via script tags but with some extra features including the ability to shim dependencies, set custom globals, and define the exports of the global module.

Upvotes: 1

Jeremy Danyow
Jeremy Danyow

Reputation: 26396

You could tell babel to ignore the module:

config.js

System.config({
  defaultJSExtensions: true,
  transpiler: "babel",
  babelOptions: {
    "ignore": [
      "github:*",
      "npm:*",
      "my/module/that/i/do/not/want/transpiled.js"
    ],
    ...

Not sure if this is exactly what you're looking for or whether the .js is needed.

Upvotes: 2

Related Questions