Issue 1:
I'm submitting a ...

[X] bug report

Current behavior

Error Messages on running npm run test after upgrade from 2.4.8 to 4.0.0-rc1:

[at-loader] Checking finished with 1045 errors
Hash: 2075dbec0d36e9d4552f
Version: webpack 2.2.0
Time: 17756ms
Asset Size Chunks Chunk Names
0.bundle.js 690 bytes 0 [emitted]
config/spec-bundle.js 8.18 MB 1 [emitted] [big] config/spec-bundle.js

WARNING in ./~/@angular/core/@angular/core.es5.js
3702:272-293 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/@angular/core.es5.js
3705:332-415 Critical dependency: the request of a dependency is an expression

ERROR in ./src/app/home/x-large/x-large.directive.spec.ts
Module not found: Error: Can't resolve '@angular/platform-browser/src/dom/debug/by' in 'C:\projects\angular2-webpack-starter\src\app\home\x-large'
@ ./src/app/home/x-large/x-large.directive.spec.ts 5:11-64
@ ./src \.spec\.ts
@ ./config/spec-bundle.js

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:13:36
Type 'any' is not a constructor function type.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:14:27
Namespace ''*'' has no exported member 'CommonModule'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:15:30
Namespace ''*'' has no exported member 'NgLocaleLocalization'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:16:30
Namespace ''*'' has no exported member 'Injector'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:19:35
Namespace ''*'' has no exported member 'NgLocaleLocalization'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:20:111
Property 'parent' does not exist on type 'CommonModuleInjector'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:23:28
Namespace ''*'' has no exported member 'CommonModule'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\common_module.ngfactory.ts:35:44
Namespace ''*'' has no exported member 'NgModuleFactory'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\directives\ng_class.ngfactory.ts:14:19
Namespace ''*'' has no exported member 'NgClass'.

ERROR in [at-loader] compiled\node_modules\@angular\common\src\directives\ng_class.ngfactory.ts:24:27
Namespace ''*'' has no exported member 'AppView'.

.....

ERROR in [at-loader] compiled\src\app\no-content\no-content.component.ngfactory.ts:96:25
Property 'renderer' does not exist on type 'View_NoContentComponent0'.

ERROR in [at-loader] compiled\src\app\no-content\no-content.component.ngfactory.ts:97:10
Property 'init' does not exist on type 'View_NoContentComponent0'.

ERROR in [at-loader] compiled\src\app\no-content\no-content.component.ngfactory.ts:97:41
Property 'renderer' does not exist on type 'View_NoContentComponent0'.

Everything works when running my application in either debug or production mode without errors - although the same errors appear when trying an aot build with:

[at-loader] Checking finished with 16433 errors

Minimal reproduction of the problem with instructions

The same errors as I get in my real project can be observed using this minimal angular2-webpack-starter which I upgraded using the npm install command specified in the release notes:

git clone https://github.com/arturh85/angular2-webpack-starter.git
cd angular2-webpack-starter
npm i
npm test

Angular version: upgrading from 2.4.8 to 4.0.0-rc1

see arturh85/angular2-webpack-starter@057b37f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

Node (for AoT issues): node --version =

v6.2.2 (Windows 10)

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting

Current behavior

ES5 testing bundle files(testing.es5.js) contain ES2015 codes.

Expected behavior

testing.es5.js files contain transpiled ES5 codes.

Angular version: 4.0.0-rc.1

Language:: Typescript 2.1.6