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

Support for shared modules between NativeScript and Web #5

Closed
VladimirMakaev opened this issue Nov 22, 2017 · 2 comments
Closed

Support for shared modules between NativeScript and Web #5

VladimirMakaev opened this issue Nov 22, 2017 · 2 comments

Comments

@VladimirMakaev
Copy link

One of the recommended way to build shared modules between NativeScript and Web is to use build time solution with conditionally using moduleName.module.tns.ts for NativeScript and moduleName.module.ts for web.

This is particularly needed in the scenarios when we share commonly used set of UI Components. E.g. we might wanna have a unified layer of components like: my-datepicker, my-button, my-table which are implemented by e.g. ng-semantic on web and hand coded for NativeScript but they have the same data contract and therefore other vertical cross platform feature modules can import them consistently on both platforms. I can only think of that build time solution to support AOT compilation.

Same approach is used by this seed project https://github.com/TeamMaestro/angular-native-seed

Do you have any plans to support this scenario? Pottentially be able to generate shared module using cli?

@m-abs
Copy link

m-abs commented Nov 29, 2017

I don't think that would fit very well with the way nx works.

Nathan posted a suggestion on the angular-seed-advanced project, that I think would be more fitting:
NathanWalker/angular-seed-advanced#474

@VladimirMakaev
Copy link
Author

I see.. Basically that basically leeds to a desing like that:

angular - multiplatform angular

Which might be just ok. Thanks for pointing me out to that issue.

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