Я получаю эти предупреждения при развертывании:
WARNING in ./node_modules/@angular/core/fesm5/core.js
4996:15-36 Critical dependency: the request of a dependency is an expression
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
WARNING in ./node_modules/@angular/core/fesm5/core.js
5008:15-102 Critical dependency: the request of a dependency is an expression
@ ./node_modules/@angular/core/fesm5/core.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/main.ts
Что я пробовал:
https://github.com/angular/angular/issues/20357
Структура моего проекта:
![enter image description here](https://i.stack.imgur.com/RTHxe.jpg)
Мой webpack.config.js:
var path = require('path');
plugins: [
new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/, path.join(__dirname, './src')),
new HtmlWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
inject: 'body'
}),
new webpack.DefinePlugin({
// global app config object
config: JSON.stringify({
apiUrl: 'http://localhost:4000'
})
})
],