Angular 9警告类型脚本.js
启动应用程序后,我收到警告Angular 9警告类型脚本.js,angular,typescript,ecmascript-6,single-page-application,angular9,Angular,Typescript,Ecmascript 6,Single Page Application,Angular9,启动应用程序后,我收到警告 WARNING in ./node_modules/typescript/lib/typescript.js 5123:41-60 Critical dependency: the request of a dependency is an expression 尝试更改webpack.dev.config.js new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(
WARNING in ./node_modules/typescript/lib/typescript.js 5123:41-60
Critical dependency: the request of a dependency is an expression
尝试更改webpack.dev.config.js
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
path.resolve(__dirname, 'doesnotexist/')
)
或者至少
new webpack.ContextReplacementPlugin( /(.+)?angular(\\|\/)core(.+)?/, root('./src'), {} )
这是一个空白项目,还是您只是从以前的版本升级到angular 9?我将我的应用程序升级到angular 9。您是否可以尝试运行ng build--verbose查看完整的错误登录I使用angular CLI。也许有一种方法可以引入angular.json?不确定angular.json。尝试在angular.json的build/options下添加键:
“preserveSymlinks”:true