Error in webpack when compiling for Angular 4

Hi I have been trying to migrate from working Angular 2 to Angular 4 for 3 days. The last mistake I hope. The usual solution (

/ angular (\ | /) core (\ | /) @ angular /

) does not solve it.

Mistake:

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

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

      

I've tried these entries in the webpack.config.vendor.js file one at a time, together and in different orders.

 new webpack.ContextReplacementPlugin(
            /angular(\\|\/)core(\\|\/)@angular/, /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
            helpers.root('../src'),
            {}
        ),// FIx 3


new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580

new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898

      

+3
node.js angular webpack asp.net-core single-page-application


source to share


No one has answered this question yet

Check out similar questions:

2201
How do you decide when to use Node.js?
1203
NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack
237
No provider for HttpClient
4
Getting problem while integrating google-cloud with webpack
4
asp.netcore / angular with webpack 500 internal server error
2
Webpack failed to compile error after installing package
1
webpack: critical dependency message
1
Angular2 webpack not displaying data
0
Webpack warning when bundling ASP.NET core - angular 4 app: critical dependency: dependency request - expression
0
Ng4 tag input error: expected TagInputModule value imported by CVModule. Please add @NgModule annotation



All Articles
Loading...
X
Show
Funny
Dev
Pics