gonzofish / angular-librarian

An Angular 2+ scaffolding setup for creating libraries
https://www.npmjs.com/package/angular-librarian
MIT License
91 stars 9 forks source link

WARNING in ./~/@angular/core/@angular/core.es5.js #33

Closed stevermeister closed 7 years ago

stevermeister commented 7 years ago

when I'm doing npm start getting

WARNING in ./~/@angular/core/@angular/core.es5.js
5870:15 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/@angular/core.es5.js
5886:15 Critical dependency: the request of a dependency is an expression
gonzofish commented 7 years ago

I just ran into this the other day, let me see what I did to alleviate it

gonzofish commented 7 years ago

The issue is that from Angular 2 -> Angular 4 there were some file structure changes. One of the changes was the location of the linker. I'll fix this in the project, but here's what you can do to fix it in the meantime:

In the webpack/webpack.*.js files, change the first entry of the ContextReplacementPlugin:

/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,

to

/angular(\\|\/)core(\\|\/)((esm(\\|\/)src|src)(\\|\/)linker|@angular)/,

I'm fairly sure we can get rid of the core/esm stuff, but I'm going with a "rather safe than sorry" approach here.

gonzofish commented 7 years ago

Closed by commit ed14148