How to share code between multiple NativeScript apps and multiple Angular apps using @nrwl/nx (Nx Workspace)?
Have a look at https://nstudio.io/xplat/. It seems these guys are trying to make it easier, but it still isn't an easy thing to do.
I tried out xplat. It did look promising but I was trying to integrate into an existing codebase and it felt disjointed trying to figure out what belonged in their core and how I was supposed to deal with all the existing modules each with their own service that used HttpClientModule and needed to be converted to using the NativeScript version.
Instead, I ended up going with the Code Sharing approach that NativeScript recommends. Code Sharing
This method complicates the folder structure as you duplicate any file in-place that needs to be different for NativeScript. Basically, you add .tns
just before the file extension. Then it uses some build tools that use those files when they are there.
© 2022 - 2024 — McMap. All rights reserved.