Issue 1:
I've taken a project I was working on from the 1.5 beta, and simply switched from CommonJS modules to System. I now seem to be getting the title error on startup which suggests something is perhaps amiss in the output?

I've not managed to create a small reproduction yet, but here are the TS and JS for the code file which SystemJS is complaining about:

alert.ts

import { StandardDialog } from '../standard/standard';

export interface AlertDialogOptions {
/**
* The text to display on the 'OK' button. Defaults to 'OK'.
*/
okText?: string;
}

export class AlertDialog extends StandardDialog {
// Constructor
constructor(text: string, opts?: AlertDialogOptions) {
const content = $("<p>").text(text);
const okText = (opts && opts.okText) ? opts.okText : "OK";

super({
content: content,
buttons: [
{ text: okText, primary: true, click: () => this._ok_click() }
]
});

this.el.classList.add("alert-dialog");
}

// Event Handlers
private _ok_click(): void {
this.close();
}

// Static Methods

/**
* Shows an Alert dialog. Returns a promise that will resolve when the OK button is clicked
* @param text the text to be displayed
* @param opts any non-default options
*/
public static show(text: string, opts?: AlertDialogOptions): Promise<void> {
const dlg = new AlertDialog(text, opts);
return dlg.show();
}
}

alert.js

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};System.register(['../standard/standard'], function(exports_1) {
var standard_1;
var AlertDialog;
return {
setters:[
function (_standard_1) {
standard_1 = _standard_1;
}],
execute: function() {
AlertDialog = (function (_super) {
__extends(AlertDialog, _super);
// Constructor
function AlertDialog(text, opts) {
var _this = this;
var content = $("<p>").text(text);
var okText = (opts && opts.okText) ? opts.okText : "OK";
_super.call(this, {
content: content,
buttons: [
{ text: okText, primary: true, click: function () { return _this._ok_click(); } }
]
});
this.el.classList.add("alert-dialog");
}
// Event Handlers
AlertDialog.prototype._ok_click = function () {
this.close();
};
// Static Methods
/**
* Shows an Alert dialog. Returns a promise that will resolve when the OK button is clicked
* @param text the text to be displayed
* @param opts any non-default options
*/
AlertDialog.show = function (text, opts) {
var dlg = new AlertDialog(text, opts);
return dlg.show();
};
return AlertDialog;
})(standard_1.StandardDialog);
exports_1("AlertDialog", AlertDialog);
}
}
});
//# sourceMappingURL=alert.js.map

Console:

Uncaught TypeError: Multiple anonymous System.register calls in the same module file.
Uncaught (in promise) Uncaught TypeError: Multiple anonymous System.register calls in the same module file.
Evaluating http://localhost:4544/src/ui/dialogs/common/alert.js
Error loading http://localhost:4544/src/startup.js

Hope this is helpful. I'll try to find a way to reproduce with a smaller set of code if it isn't.

EDIT: btw, I did some searching around the issue before posting and noticed a few things said about bundles. Just to be clear, I'm not using bundles at the moment.

Issue 2:
Using this contrived example again,

Export file with super class:

/// foo.ts
export class Foo {
a: string;
}

Import file with sub class:

/// bar.ts
import {Foo} from './foo';

export class Bar extends Foo {
b: string;
}

System.register format output:

/// bar.js
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};System.register(['./foo'], function(exports_1) {
var foo_1;
var Bar;
return {
setters:[
function (_foo_1) {
foo_1 = _foo_1;
}],
execute: function() {
Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
_super.apply(this, arguments);
}
return Bar;
})(foo_1.Foo);
exports_1("Bar", Bar);
}
}
});

The output of System.register contains no namespace. This is not valid System.register bundle format output. When we bundle our files, our bundle will be broken with this output. To adhere to proper bundle format, the output would need to be:

/// bar.js
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};System.register('bar', ['./foo'], function(exports_1) {
var foo_1;
var Bar;
return {
setters:[
function (_foo_1) {
foo_1 = _foo_1;
}],
execute: function() {
Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
_super.apply(this, arguments);
}
return Bar;
})(foo_1.Foo);
exports_1("Bar", Bar);
}
}
});

Notice that the System.register call now has a namespace which matches the name of the file.

This would help Angular out a lot.

Thanks for all the hard work guys!