-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Use angular native federation with builder configuration: "@angular-devkit/build-angular:browser-esbuild" #28837
Comments
The Can you provide additional details on your project's use cases for |
We may need the browser-esbuild configuration when using the library like: If we look in the projects folder of this library, we find the demo project configured with the :browser settings. Indeed, if I do NOT initialize the project with the command Currently, if I create MFEs with the |
I'm sorry, but this issue is not caused by Angular CLI. Please contact the author(s) of the https://github.com/angular-architects/module-federation-plugin project or file an issue on their issue tracker. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
HI,
Using the angular-architects/native-federation library and initializing with the command ng g @angular-architects/native-federation:init --type host the microfrontend will change the angular.json file by adding the esbuild configuration in architect. The esbuild configuration pre-configured the builder with the angular-devkit/build-angular:application option. If I run ng serve with this configuration the microfrontend works, but unfortunately I would need the browser-esbuild option and this is where the problem arises.
So by configuring angular-devkit/build-angular:browser-esbuild and changing the key from options.browser to options.main and then starting ng serve I get the error:
Error: Schema validation failed with the following errors:
Data path "" must have required property 'browser'.
Changing again from options.main to options.browser (not noticing that it warns you by saying: the browser property is not allowed.) and running ng serve again gives me:
Error: Schema validation failed with the following errors:
Data path "" must have required property 'main'.
Another test I performed is deleting the options.main/options.browser key and running ng serve again gives me the error:
Error: Schema validation failed with the following errors:
Data path "" must have required property 'main'.
Even initializing the microfrontend with --type remote gives the same problem
Minimal Reproduction
reproducing this error is simple:
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: