NativeScript / nx

NativeScript for Nx.
Other
64 stars 17 forks source link

[feature suggestion]: Build for Web and Mobile #40

Open YonatanKra opened 3 years ago

YonatanKra commented 3 years ago

Currently the plugin is aimed towards mobile only. Its nx serve command is running tns.

This doesn't support architectures like this code sharing.

I know that NS is not just for angular, but this might be super useful in case one chooses an angular NS project.

One idea would be to enable several such features:

  1. Allow to serve regular apps vs NS (e.g. via a flag)
  2. Allow to create duplicate modules/components/etc. files (both .tns and web) like suggested in the article

I haven't made the attempt to make the separation but there should be more features involved in this Epic.

mahmoudajawad commented 3 years ago

As, Nativescript team blogged when this package was announced, the shared project approach had all kind of limitations in additional to making the project structure way more complex that it should be. Nx support was essentially to get away from those issues and implement a monorepo where you can have web and mobile apps access shared logic as lib in the workspace. Have a look at: https://github.com/NativeScript/nx/issues/20#issuecomment-841853523