Unerwarteter Wert 'MyCustomModule', der vom Modul 'AppModule' importiert wurde

Ich versuche, eine meiner benutzerdefinierten angle2-Bibliotheken auf RC.6 + Webpack zu migrieren. Meine Verzeichnisstruktur ist:

- src - source TS files
- lib - transpiled JS files + definition files
- dev - development app to test if it works / looks ok.
- myCustomLib.js - barrel
- myCustomLib.d.ts

Innerhalbdev Ordner versuchen, eine App auszuführen. Ich starte mein Modul:

app.module.ts

import { BrowserModule }                from "@angular/platform-browser";
import { NgModule }                     from "@angular/core";
import { AppComponent }                 from "./app.component";
import { MyCustomModule }               from "../../myCustomLib";

@NgModule({
    imports: [
        BrowserModule,
        MyCustomModule
    ],
    declarations: [ AppComponent ],
    bootstrap: [ AppComponent ]
})
export class AppModule {
}

Nun mit dem Webpack bündle ich meine Entwickler-App.

webpack.config.js

module.exports = {
    entry: "./app/boot",
    output: {
        path: __dirname,
        filename: "./bundle.js",
    },
    resolve: {
        extensions: ['', '.js', '.ts'],
        modules: [
            'node_modules'
        ]
    },
    devtool: 'source-map',
    module: {
        loaders: [{
            test: /\.js$/,
            loader: 'babel-loader',
            exclude: /node_modules/
        }, {
            test: /\.ts$/,
            loader: 'awesome-typescript-loader',
            exclude: /node_modules/
        }]
    },
    watch: true
};

Aber wenn ich versuche, die App zu laden, erhalte ich eine Nachricht:

metadata_resolver.js:230
Uncaught Error: Unexpected value 'MyCustomModule' imported by the module 'AppModule'

Meine Fassdatei, die ich importiere, sieht folgendermaßen aus:

myCustomLib.js

export * from './lib/myCustomLib.module';

Ich fand auchhint zu ähnlichem Thema auf github, aber ändere es in:

export { MyCustomModule } from './lib/myCustomLib.module';

hat nicht geholfen. Ich habe auch versucht, das Modul von @ zu importiersrc Verzeichnis - gleicher Fehler. MyCustomModule sollte in Ordnung sein, da es zuvor mit systemJS einwandfrei funktioniert hat.

myCustomLib.module.ts:

import { NgModule }                     from '@angular/core';
import { BrowserModule }                from '@angular/platform-browser';

@NgModule({
    imports: [
        BrowserModule
    ]
})
export class MyCustomModule {}

Eine Idee, woran kann dieser Fehler liegen? Ich habe hier ähnliche Themen gesehen, aber keine Antwort oder Hinweis hat geholfen.

Bearbeite: Um das Beispiel noch einfacher zu machen, habe ich alle aus MyCustomModule entfernt - das gleiche Problem ...

Antworten auf die Frage(6)

Ihre Antwort auf die Frage