<p dir="auto"><strong>I'm submitting a ...</strong></p>
<p dir="auto">[X] bug report</p>
<p dir="auto"><strong>Current behavior</strong><br>
Error Messages on running npm run test after upgrade from 2.4.8 to 4.0.0-rc1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[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'."><pre class="notranslate"><code class="notranslate">[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'.
</code></pre></div>
<p dir="auto">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:</p>
<p dir="auto"><code class="notranslate">[at-loader] Checking finished with 16433 errors</code></p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto">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:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone https://github.com/arturh85/angular2-webpack-starter.git
cd angular2-webpack-starter
npm i
npm test"><pre class="notranslate"><code class="notranslate">git clone https://github.com/arturh85/angular2-webpack-starter.git
cd angular2-webpack-starter
npm i
npm test
</code></pre></div>
<ul dir="auto">
<li><strong>Angular version:</strong> upgrading from 2.4.8 to 4.0.0-rc1</li>
</ul>
<p dir="auto">see <a class="commit-link" href="https://github.com/arturh85/angular2-webpack-starter/commit/057b37f1f6d378de11140d07a37af07185199d30#diff-b9cfc7f2cdf78a7f4b91a753d10865a2">arturh85/angular2-webpack-starter@<tt>057b37f</tt>#diff-b9cfc7f2cdf78a7f4b91a753d10865a2</a></p>
<ul dir="auto">
<li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
v6.2.2 (Windows 10)</li>
</ul>
<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
ES5 testing bundle files(<code class="notranslate">testing.es5.js</code>) contain ES2015 codes.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
<code class="notranslate">testing.es5.js</code> files contain transpiled ES5 codes.</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 4.0.0-rc.1</li>
</ul>

<ul dir="auto">
<li><strong>Language:</strong>: Typescript 2.1.6</li>
</ul>