Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ng serve issue with Angular new build system and module federation plug in #653

Open
muqtharali opened this issue Sep 26, 2024 · 2 comments

Comments

@muqtharali
Copy link

I am using Angular v17 and web pack module federation v17 plug in for micro frontend applications.

I am trying to migrate the existing application to Angular 18 which will use the Angular new build system Application builder.

During Angular 18 migration, getting this message

image

In my existing application, it is using ngx-build-plus builder so it is not migrating to new build system.

"builder": "ngx-build-plus:browser",

So I have migrated module federation to native federation using this migration guide

https://github.com/angular-architects/module-federation-plugin/blob/main/libs/native-federation/docs/migrate.md

After this migration, it is using native-federation builder as shown below

"builder": "@angular-architects/native-federation:build",

But when I run ng serve command getting the below error

**

An unhandled exception occurred: Configuration 'development' is not set in the workspace.

**

Please let me know, if I am doing anything wrong.

Also please let me know the process to migrate existing module federation project to angular v18 new build system.

@manfredsteyer
Copy link
Contributor

Can you please check if your serve and build targets in angular.json have a development configuration?

@muqtharali
Copy link
Author

muqtharali commented Oct 1, 2024

@manfredsteyer Please find angular.json entries for build and serve after migrating to native federation from module federation

"architect": {
				"build": {
					"builder": "@angular-architects/native-federation:build",
					"options": {},
					"configurations": {
						"production": {
							"target": "project-name:esbuild:production"
						},
						"development": {
							"target": "project-name:esbuild:development",
							"development": true
						}
					},
					"defaultConfiguration": "production"
				},
				"serve": {
					"builder": "@angular-architects/native-federation:build",
					"options": {
						"target": "project-name:serve-original:development",
						"rebuildDelay": 0,
						"development": true,
						"port": 0
					}
				}
				
			}

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

No branches or pull requests

2 participants