nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.55k stars 2.35k forks source link

Add @nrwl/angular:elements #1397

Closed xmlking closed 3 years ago

xmlking commented 5 years ago

Is there any difference how code is generated when using preset=angular vs preset=web-components ?

ng new myspace --collection=@nrwl/workspace --preset=angular 
ng new myspace --collection=@nrwl/workspace --preset=web-components

It would be nice to be able to add web-components micro-app to existing workspace e.g.,

ng g @nrwl/angular:web-components chatApp 
FrozenPandaz commented 5 years ago

--preset web-components does not use Angular or any framework at all. The way I imagine this would work in the future is you can do ng g @nrwl/web:component fancy-button (it's not there yet). Then you would be able to use that within an Angular or React app.

xmlking commented 5 years ago

creating a web-component a.k.a MicroApp using Angular Elements in nx workspace could be complex multi-step process... Ref: @manfredsteyer https://www.softwarearchitekt.at/post/2018/05/04/microservice-clients-with-web-components-using-angular-elements-dreams-of-the-near-future.aspx

would be nice, if we provide @nrwl/angular:elements schematics to make this process easy for nx community.

generic ng g @nrwl/web:component fancy-button could be used for user to add their prefered framework later (svelte, vue , react or angular)

alejandrogkl commented 4 years ago

HI, i was looking for tutorials of how to re-architect an angular SPA that is getting bigger.

One of the possibilities is a Shell App that load multiple micro apps or micro frontends

The SPA is currently using NX ( Excellent work by the way @vsavkin and team ) and the potential micro apps are in separated micro-app libraries with a lot of internally lazy loaded modules

I found a lot of recommendations, but one in particular

https://www.softwarearchitekt.at/aktuelles/6-steps-to-your-angular-based-microfrontend-shell/

I think is the continuation of the one you @xmlking mention, but i still have a couple of questions that maybe you can help me answer

1 - How could be possible to load the micro apps in chunks ( like a normal SPA with lazy load ) and not in a single file? ( since is a multiple step process a micro app could be big enough for a single file )

2 - During development running the entire app (Which is very usual) how to reload the browser when a micro app change?

The concern about the app getting big enough are:

Any recommendation will be really appreciated

arjunasuresh3 commented 4 years ago

+1

FrozenPandaz commented 4 years ago

Hi, sorry about this.

This was mislabeled as stale. We are testing ways to mark not reproducible issues as stale so that we can focus on actionable items but our initial experiment was too broad and unintentionally labeled this issue as stale.

LPCmedia commented 4 years ago

Are there any plans for an implementation for angular elements ?

brandonroberts commented 4 years ago

Circling back on this and I'm a little unclear to the request ... What is the intended goal?

LPCmedia commented 4 years ago

I guess would be nice to have a builder for angular elements. Something similar to ngx-build-plus but that can compile a lib to one or more elements.

mehrad-rafigh commented 3 years ago

Any news on this? Can the community tackle this @brandonroberts?

brandonroberts commented 3 years ago

No news as of yet. If someone wants to look at creating a community Nx Plugin for it, that would be a good start

mehrad-rafigh commented 3 years ago

@xmlking @LPCmedia should we start a new nx-plugin 🤓?

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

kasius commented 2 years ago

any news regarding this?

aitorllj93 commented 2 years ago

maybe this can help https://angular-extensions.github.io/elements/#/home

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.