Skip to content

circlingthesun/systemjs-script-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SystemJS script tag loading plugin

Install

jspm install npm:system-script

Basic Use

import 'www.google-analytics.com/analytics.js!system-script'

The example above loads google analytics via a script tag instead of a XHR request which avoid CORS issues.

SystemJS 0.17+

Note that as of SystemJS 0.17 the functionality in this plugin can be achieved via the following config:

System.config({
  ...
  meta: {
    "ga": {
      "scriptLoad": true,
      "format": "global",
      "exports": "ga"
    }
  },
  map: {
    "ga": "//www.google-analytics.com/analytics.js"
  }
});

License

MIT

About

Loads scripts via a script tag inject in systemjs

Resources

License

Stars

Watchers

Forks

Packages

No packages published