In case the application has dependency on nativescript-unit-test-runner, calling tns build <platform> --release will include the unit-test runner in the prepared package. It is not expected to have it there in release build.
Some options to resolve the issue:
- Implement special logic in CLI to exclude the
nativescript-unit-test-runner when in release build. The problem here is that if the same issue occurs with other modules, we'll have to hard-code them in CLI as well.
- Install
nativescript-unit-test-runner as devDependency and add logic in it to be copied to <platforms> directory on after-prepare. This way the plugin will have the logic when to be copied to the project and when not. The same approach can be used for other packages.
In case the application has dependency on
nativescript-unit-test-runner, callingtns build <platform> --releasewill include the unit-test runner in the prepared package. It is not expected to have it there in release build.Some options to resolve the issue:
nativescript-unit-test-runnerwhen in release build. The problem here is that if the same issue occurs with other modules, we'll have to hard-code them in CLI as well.nativescript-unit-test-runneras devDependency and add logic in it to be copied to<platforms>directory onafter-prepare. This way the plugin will have the logic when to be copied to the project and when not. The same approach can be used for other packages.