Angular 为什么ngc+;汇总绑定角2 RC.6路由失败?

Angular 为什么ngc+;汇总绑定角2 RC.6路由失败?,angular,ecmascript-6,babeljs,rollup,rollupjs,Angular,Ecmascript 6,Babeljs,Rollup,Rollupjs,我试图利用RC.6中提供的新AOT编译,但遇到了一个拦截器。我可以使用ngc=>Rollup=>Babel成功创建捆绑包,但是每次运行Rollup时都会收到多个警告: 此关键字相当于ES模块顶层的未定义的,已被重写 捆绑成功完成。相同的代码库可以很好地用于JIT编译。Angular 2应用程序引导速度很快,但每次我尝试导航到根目录以外的其他路径时,都会出现以下错误: ``` ``` ngc编译时没有任何警告或错误 我的rollup.config.js如下所示: ``` ``` 使用Babel将E

我试图利用RC.6中提供的新AOT编译,但遇到了一个拦截器。我可以使用ngc=>Rollup=>Babel成功创建捆绑包,但是每次运行Rollup时都会收到多个警告:

此关键字相当于ES模块顶层的
未定义的
,已被重写

捆绑成功完成。相同的代码库可以很好地用于JIT编译。Angular 2应用程序引导速度很快,但每次我尝试导航到根目录以外的其他路径时,都会出现以下错误:

```

```

ngc编译时没有任何警告或错误

我的rollup.config.js如下所示:

```

```

使用Babel将ES2015捆绑包向下传输至ES5时,我收到以下警告:


[BABEL]注意:代码生成器取消了“/dist/bundle.es2015.js”的样式设置,因为它超过了最大值“100KB”。

可能是什么问题

问候,,
Steve

我无法让Babel 6.5.2正确传输捆绑包。根据Rob Wormald的建议,我尝试使用闭包编译器从Rollup传输ES2015捆绑包输出,结果成功了。似乎只有Java版本是稳定的,但当JS版本顺利运行时,我计划将其与我的
rollup.config.JS
集成。现在,我通过npm脚本中的一系列异步回调来处理构建


我无法让Babel 6.5.2正确传输捆绑包。根据Rob Wormald的建议,我尝试使用闭包编译器从Rollup传输ES2015捆绑包输出,结果成功了。似乎只有Java版本是稳定的,但当JS版本顺利运行时,我计划将其与我的
rollup.config.JS
集成。现在,我通过npm脚本中的一系列异步回调来处理构建


即使没有AoT,我也有同样的问题。tsc(es6/es2015)->汇总->es5。路由器不适用于特定的路由(应用程序加载良好,其他一些路由也可以),但到目前为止还没有找到原因。即使没有AoT,我也有同样的问题。tsc(es6/es2015)->汇总->es5。路由器不适用于特定的路由(应用程序加载良好,其他一些路由也能工作),但到目前为止还没有找到原因。
bundle.js:2781 EXCEPTION: Uncaught (in promise): EmptyError: no elements in    sequenceErrorHandler.handleError @ bundle.js:2781
bundle.js:2781 ORIGINAL STACKTRACE:ErrorHandler.handleError @ bundle.js:2781
bundle.js:2781 Error: Uncaught (in promise): EmptyError: no elements in sequence
    at resolvePromise (zone.js:558)
    at zone.js:535
    at ZoneDelegate.invoke (zone.js:332)
    at Object.onInvoke (bundle.js:3549)
    at ZoneDelegate.invoke (zone.js:331)
    at Zone.run (zone.js:225)
    at zone.js:591
    at ZoneDelegate.invokeTask (zone.js:365)
    at Object.onInvokeTask (bundle.js:3549)
    at ZoneDelegate.invokeTask (zone.js:364)ErrorHandler.handleError @ bundle.js:2781
zone.js:484 Unhandled Promise rejection: no elements in sequence ; Zone: angular ; Task: Promise.then ; Value: Error: no elements in sequence
    at new EmptyError (bundle.js:7019)
    at FirstSubscriber._complete (bundle.js:7071)
    at FirstSubscriber.complete (bundle.js:3410)
    at MergeAllSubscriber._complete (bundle.js:6854)
    at MergeAllSubscriber.complete (bundle.js:3410)
    at MapSubscriber._complete (bundle.js:3410)
    at MapSubscriber.complete (bundle.js:3410)
    at EmptyObservable._subscribe (bundle.js:6598)
    at EmptyObservable.subscribe (bundle.js:3441)
    at Observable.subscribe (bundle.js:3441) EmptyError: no elements in sequence
    at new EmptyError (http://localhost:4200/bundle.js:7019:243)
    at FirstSubscriber._complete (http://localhost:4200/bundle.js:7071:1680)
    at FirstSubscriber.complete (http://localhost:4200/bundle.js:3410:99)
    at MergeAllSubscriber._complete (http://localhost:4200/bundle.js:6854:783)
    at MergeAllSubscriber.complete (http://localhost:4200/bundle.js:3410:99)
    at MapSubscriber._complete (http://localhost:4200/bundle.js:3410:547)
    at MapSubscriber.complete (http://localhost:4200/bundle.js:3410:99)
    at EmptyObservable._subscribe (http://localhost:4200/bundle.js:6598:234)
    at EmptyObservable.subscribe (http://localhost:4200/bundle.js:3441:223)
    at Observable.subscribe (http://localhost:4200/bundle.js:3441:187)consoleError @ zone.js:484
zone.js:486 Error: Uncaught (in promise): EmptyError: no elements in sequence
    at resolvePromise (zone.js:558)
    at zone.js:535
    at ZoneDelegate.invoke (zone.js:332)
    at Object.onInvoke (bundle.js:3549)
    at ZoneDelegate.invoke (zone.js:331)
    at Zone.run (zone.js:225)
    at zone.js:591
    at ZoneDelegate.invokeTask (zone.js:365)
    at Object.onInvokeTask (bundle.js:3549)
    at ZoneDelegate.invokeTask (zone.js:364)
// rollup.config.js
import alias from 'rollup-plugin-alias';
import resolve from 'rollup-plugin-node-resolve';


export default {
  entry: 'main.js',
  format: 'iife',
  dest: 'dist/bundle.es2015.js',
  sourceMap: false,
  plugins: [
    alias({ rxjs: __dirname + '/node_modules/rxjs-es' }),
    resolve({ module: true })
  ]
}