Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

fix(template): ship bundle with empty tns-java-classes.js chunk #128

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

sis0k0
Copy link
Contributor

@sis0k0 sis0k0 commented Apr 21, 2017

This is required for compatibility reasons (NativeScript 2.5).
When a non-webpacked NativeScript application is deployed to phone, the apk
contains a tns-java-classes.js file. If that file is present, it is
dynamically loaded by the Android runtime at startup.
Webpacked NativeScript applications didn't contain that file as it is
not needed. But when the application is deployed to phone, the previous
tns-java-classes.js file is not removed from the app folder on the
phone. That causes the Android runtime to try load the file and fail.
Since this commit, all webpacked NativeScript apps will be shipped with
an empty tns-java-classes.js file which is harmless and is used to
override the existing file left from previous deployment.

related to NativeScript/NativeScript#3613, NativeScript/NativeScript#3947

This is required for compatibility reasons (NativeScript 2.5).
When a non-webpacked NativeScript application is deployed to phone, the apk
contains a `tns-java-classes.js` file. If that file is present, it is
dynamically loaded by the Android runtime at startup.
Webpacked NativeScript applications didn't contain that file as it is
not needed. But when the application is deployed to phone, the previous
`tns-java-classes.js` file is not removed from the app folder on the
phone. That causes the Android runtime to try load the file and fail.
Since this commit, all webpacked NativeScript apps will be shipped with
an empty `tns-java-classes.js` file which is harmless and is used to
override the existing file left from previous deployment.

related to NativeScript/NativeScript#3613, NativeScript/NativeScript#3947
@sis0k0
Copy link
Contributor Author

sis0k0 commented Apr 24, 2017

run ci

@sis0k0 sis0k0 merged commit b65a80c into master Apr 25, 2017
@sis0k0 sis0k0 deleted the vlaeva/template-tns-java-classes branch April 25, 2017 09:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants