【发布时间】:2017-06-20 14:45:50
【问题描述】:
启动 webpack-dev-server 时会抛出以下警告:
WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11051:13-17 "export 'ɵcmf' was not found in '@angular/core'
WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11056:13-17 "export 'ɵmod' was not found in '@angular/core'
WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
11061:13-17 "export 'ɵmpd' was not found in '@angular/core'
由于它只是一个警告,因此在尝试访问应用程序时仍会生成并提供输出
Uncaught TypeError: jit_val0 is not a function
at eval (module.ngfactory.js? [sm]:1)
at evalExpression (compiler.es5.js:26423)
at jitStatements (compiler.es5.js:26435)
at JitCompiler._compileModule (compiler.es5.js:26716)
at compiler.es5.js:26655
at Object.then (compiler.es5.js:1679)
at JitCompiler._compileModuleAndComponents (compiler.es5.js:26653)
at JitCompiler.compileModuleAsync (compiler.es5.js:26582)
at PlatformRef_._bootstrapModuleWithZone (core.es5.js:4811)
at PlatformRef_.bootstrapModule (core.es5.js:4797)
(anonymous) @ module.ngfactory.js? [sm]:1
evalExpression @ compiler.es5.js:26423
jitStatements @ compiler.es5.js:26435
JitCompiler._compileModule @ compiler.es5.js:26716
(anonymous) @ compiler.es5.js:26655
then @ compiler.es5.js:1679
JitCompiler._compileModuleAndComponents @ compiler.es5.js:26653
JitCompiler.compileModuleAsync @ compiler.es5.js:26582
PlatformRef_._bootstrapModuleWithZone @ core.es5.js:4811
PlatformRef_.bootstrapModule @ core.es5.js:4797
(anonymous) @ main.ts:12
__webpack_require__ @ bootstrap 91fab75…:54
(anonymous) @ main.bundle.js:20785
__webpack_require__ @ bootstrap 91fab75…:54
webpackJsonpCallback @ bootstrap 91fab75…:25
(anonymous) @ main.bundle.js:1
被抛出并且 Angular 没有成功引导。
【问题讨论】:
-
你可以发布 webpack 配置文件吗?
-
gist.github.com/Aides359/16d2f5466521f69bdef5f53aeebc4057 它基本上是基本的
ng eject配置(稍作修改)
标签: angular webpack webpack-dev-server