Questions tagged [systemjs]

Spec-compliant universal module loader - loads ES6 modules, AMD, CommonJS and global scripts.

Designed as a small collection of extensions to the ES6 specification System loader, which can be applied individually or all together.

Features include:

  • Core: Some small fixes to the spec loader behavior.
  • Formats: Dynamically load AMD, CommonJS and global scripts (as well as ES6 modules) - detecting the format automatically, or with format hints.
  • Map: Map configuration.
  • Versions: Multi-version support for semver compatible version ranges (@^1.2.3 syntax).
  • Plugins: A dynamic plugin system for modular loading rules.
  • Bundles: Dynamically link requires to bundle files.

Designed to work with the ES6 Module Loader polyfill (15KB minified) for a combined footprint of 27KB. In future, with native implementations, the ES6 Module Loader polyfill should no longer be necessary. As jQuery provides for the DOM, this library can smooth over inconsistiencies and missing practical functionality provided by the native System loader.

Runs in the browser and NodeJS.


Useful links

1398 questions
19
votes
1 answer

ES6 imports - what does the exclamation mark mean?

I'm following along with the Choose ES6 Modules Today guide, and I noticed one of the import statements he's using has an exclamation mark at the end: import 'bootstrap/css/bootstrap.css!'; What does that exclamation mark signify? This import…
Lukas S.
  • 5,698
  • 5
  • 35
  • 50
18
votes
1 answer

SystemJS vs Webpack for Angular 2 applications

We are starting a new Angular2 SPA and I am looking into whether to use SystemJS as described in the Angular Quickstart tutorial (https://angular.io/guide/quickstart) or Webpack (https://angular.io/docs/ts/latest/guide/webpack.html). Researching…
bka
  • 221
  • 2
  • 7
18
votes
5 answers

Troubles with importing classes from Angular 2 modules with Typescript 1.7

I am having some trouble understanding how to import classes from Modules in TypeScript, specifically for Angular 2 in Visual Studio 2015 (update 1) with TypeScript 1.7. Everywhere in the Angular 2 documentation I see import statements such…
Adam Hitchens
  • 368
  • 1
  • 3
  • 9
18
votes
4 answers

How do I build a single js file for AWS Lambda nodejs runtime

We are working on a project/framework that aids in deploying and maintaining code in AWS Lambda. I want to build/bundle all node.js code for a lambda function into one js file because: Smaller codebases help with lambda cold start issues Lambda has…
rynop
  • 50,086
  • 26
  • 101
  • 112
17
votes
2 answers

SystemJS making ~200 requests for non-existing files

I'm really lost about this. When I load my Angular2 app, I have about 200 requests to my server for non-existing files under node_modules/systemjs. Here's a sample of of those requests: 127.0.0.1 - - [13/Sep/2016 13:00:06] "GET…
Juicy
  • 11,840
  • 35
  • 123
  • 212
17
votes
1 answer

Uncaught reflect-metadata shim is required when using ES6 with Angular2 rc3

I just updated Angular from rc-1 to latest rc-3. The app is using JavaScript ES6 and SystemJS. When I run the app with browsersync, it works. But if I bundle the app (with systemjs-builder) and then run it, I have this error in the browser console…
rocketer
  • 1,051
  • 3
  • 13
  • 40
17
votes
1 answer

Angular 2 gives SystemJS cannot find /angular2/http module

I have created a service for Angular 2: import {Injectable} from "angular2/core"; import {Http} from "angular2/http"; import {TaskModel} from "./tasks.model" @Injectable() export class TasksDataService { tasks:Array; …
Bas van Dijk
  • 9,933
  • 10
  • 55
  • 91
17
votes
2 answers

Performance Problems using System.js

I'm playing around with system.js (inspired by angular2 using it for their tutorials), but I get ridiculously bad performance even for the most trivial sample. For example the following code has a delay of 26000ms(!) between the second (the one…
Voo
  • 29,040
  • 11
  • 82
  • 156
16
votes
1 answer

How do I map ./[module] to /[module]/[module].js in System.JS?

I'm trying to import material-ui into my React app using System.JS In my app, I'm doing this: import {AppBar, Tabs, Tab, Card, CardTitle} from 'material-ui'; Here's my System.JS config: System.config({ baseURL: '/node_modules', …
Quassnoi
  • 413,100
  • 91
  • 616
  • 614
16
votes
2 answers

How do I fix "ReferenceError: System is not defined" when running script from command line?

I'm trying to create typescript server side (example code import mongoose from 'mongoose'; ) and I know I'm supposed to get systemjs initialized before, but I don't know how to in a server side script. tsconfig.json { "compilerOptions": { …
chrisp
  • 2,181
  • 4
  • 27
  • 35
16
votes
5 answers

Angular 2 Beta: Visual Studio ASP .NET MVC

I built an application for Angular 2 alpha 45 and it worked wonderfully, but I had to 'mess' around a lot to get it to work. I understand Angular 2, but I don't understand how to get it to work to start actually using Angular 2. I am trying a clean…
Adam Hitchens
  • 368
  • 1
  • 3
  • 9
15
votes
1 answer

How can I namespace a SystemJS bundle

I am building a bundle using the SystemJS builder that I'd like to include in another project. The problem I'm running into is that bundle A and bundle B might both contain a 'main' module, and when I bundle them and include them in another project,…
Matthew James Davis
  • 12,134
  • 7
  • 61
  • 90
15
votes
1 answer

What does the module keyword mean in typescript?

I'm trying to figure some things related to ES6 modules. How to use namespaces together with angular and typescript. Assume the following code represents an angular directive. Does anyone know what the module keyword mean and how can you access…
ipinak
  • 5,739
  • 3
  • 23
  • 41
14
votes
1 answer

How to use minified third party Javascript files using JSPM

My application is using JSPM and SystemJS for module loading and is using angular. My config.js file has angular map like: "angular": "github:angular/bower-angular@1.5.8" So when I do import angular from 'angular', I am getting the angular.js file…
mukund
  • 2,866
  • 5
  • 31
  • 41
14
votes
1 answer

Understanding TypeScript and SystemJS WITHOUT Angular

I've been researching and doing simple "hello worlds" with TypeScript recently. There is something I think I can't wrap my head around and that is how to use System.js with TypeScript. Every single tutorial or demo out there on the internet is about…
Tequilalime
  • 611
  • 9
  • 29
1 2
3
93 94