You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why does each demo have its own copy of @nativescript/android and @nativescript/ios? #11
I can understand the case for @nativescript/webpack (it has its own executable binary, so maybe can't be hoisted), but what about @nativescript/android and @nativescript/ios?
Good question - there’s a postinstall hook in runtimes that last time I checked would cause issue when referenced but definitely try it and can see. It’s been awhile since I’ve tried referencing the runtimes like other dep’s.
I deleted apps/demo-react/node_modules and apps/demo-react/package-lock.json and installed the runtimes at the base of the monorepo before running this clean command.
Successful build and run
No postinstall problems (given that I'm using the V8 iOS runtime). So I suggest that we could save a lot of space by hoisting these two!
Looks like although iOS was happy hoisting it, Android wasn't. And maybe there's a difference between ns run demo-react:ios and tns run ios. Haven't checked.
I suspect CLI's fragile algorithm for determining runtime version, detailed in that issue, is the only reason that the runtimes can't currently be hoisted, and the only reason that they strictly have to be devDependencies rather than dependencies.
I can understand the case for
@nativescript/webpack(it has its own executable binary, so maybe can't be hoisted), but what about@nativescript/androidand@nativescript/ios?