nativescript-dev-webpack icon indicating copy to clipboard operation
nativescript-dev-webpack copied to clipboard

Webpack both Android and iOS simutaneously

Open Mitko-Kerezov opened this issue 6 years ago • 0 comments

CLI is able to execute tns run without a platform which will build and deploy to both platforms and execute LiveSync for each of them.

This is currently not possible with --bundle. There are multiple ideas about how to go about this.

  1. Launch two separate webpack processes one for each platform. The issue with this approach would be that each webpack process would watch the same files - this could lead to potential problems.
  2. Launch one webpack process that handles both platforms.

Both approaches have the issue of when to stop the webpack process for a particular platform. For example the user has one android and one iOS device, launches tns run --bundle and later on disconnects the iOS device - webpack would need to know and stop bundling for the iOS platform.

This could be done by adding an event handler for livesyncStopped or by some other approach.

Mitko-Kerezov avatar Mar 06 '18 17:03 Mitko-Kerezov