Example case:
Setup - project with web worker file where the worker imports 'globals'.
If you webpack the project, a bundle named [hash].worker.js will be generated and it will contain the whole tns-core-modules package.
Since tns-core-modules is also contained in the vendor chunk, the static binding generator will fail:
Warning: there already is an extend called com.tns.FragmentClass.
Warning: The static binding generator will generate extend from:b8fc197268e0dd59663c.worker.js implementation
:asbg:generateBindings
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior. Building 55% > :asbg:generateBindings
Please change the name of one of the extended classes.
/home/svlaeva@bedford.progress.com/nativescript-webpack-workers-issue/platforms/android/src/main/java/com/tns/FragmentClass.java
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:59)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
:asbg:generateBindings FAILED
Example case:
Setup - project with web worker file where the worker imports 'globals'.
If you webpack the project, a bundle named
[hash].worker.jswill be generated and it will contain the wholetns-core-modulespackage.Since
tns-core-modulesis also contained in the vendor chunk, the static binding generator will fail: