Skip to content

Conversation

Aukevanoost
Copy link
Collaborator

@Aukevanoost Aukevanoost commented Sep 18, 2025

Closes #907.

When building the application in devmode, the user was greeted with an error saying that split doesnt exist in undefined:

Commmand:

~/Projects/nf-debug/ng20$ npm run build host -- --configuration=development

Error:

> nf-debug@0.0.0 build
> ng build host --configuration=development

An unhandled exception occurred: Cannot read properties of undefined (reading 'split')
See "/tmp/ng-pWi9UK/angular-errors.log" for further details.

The fix creates a distinction between running in a server (like vite) or running in devmode. The builder checks if explicitly is defined if it is a devServer, if not, it checks if the target contains "serve", like the "serve-original" target.

With this fix, it is possible to run "serve" in prod and dev, as well as "build".

@jmleep
Copy link

jmleep commented Oct 2, 2025

Any updates on this PR?

@Aukevanoost Aukevanoost merged commit 35c013c into angular-architects:main Oct 9, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run MFE using production build

2 participants