I\'m trying to migrate my Angular Universal project from Angular v5 to v6
I\'ve got a service where I use fs
to load the translation on the server side.
Update 2020
See answer of Marc for Angular v9.
Update 2019
See comment, according @Tahlil it is now possible. This works for Angular v8 (Ivy compiler) see this answer. It sets specific modules to false for use in the browser in package.json.
Original answer
Ok after hours I come to the conclusion with the answers I gathered that the real answer is:
You can't use fs
anymore in Angular v6
Furthermore, since it's not possible anymore to eject the webpack configuration, there is no way to tell webpack to ignore the fs require
There is an open issue about this subject: https://github.com/angular/angular-cli/issues/10681
P.S.: I was using fs to load the translations on the server side, I overcome the problem by following solution of @xuhcc, see https://github.com/ngx-translate/core/issues/754