angular-architects / module-federation-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native Federation - isDevMode() always returns FALSE

vladyslavsemenets opened this issue · comments

Hi,

I'm using the @angular-architects/native-federation package, and I noticed when I build an application for local development (then I serve files via express), ngDevMode is undefined and isDevMode() always returns FALSE, and we can't set dev to TRUE in angular.json.

I noticed that here you are just checking the dev variable:

https://github.com/angular-architects/module-federation-plugin/blob/main/libs/native-federation/src/utils/angular-esbuild-adapter.ts#L304

if we set dev as TRUE we will get this error

[error] TypeError: Cannot read properties of undefined (reading 'split')
at targetFromTargetString (/node_modules/@angular-devkit/architect/src/api.js:58:29)
at runBuilder_1 (/mfe1/node_modules/@angular-architects/native-federation/src/builders/build/builder.js:57:61)
at runBuilder_1.next ()
at resume (/mfe1/node_modules/tslib/tslib.js:281:48)
at fulfill (//mfe1/node_modules/tslib/tslib.js:283:35)

How can I fix this?

Is this possibly related to #458?