PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

NS+angular 2 Webpack problem #35

Closed adisoftbn closed 7 years ago

adisoftbn commented 7 years ago

Hello,

I saw that there is an incompatibility between dropdown plugin and WebPack plugin.

The error you get is "Trying to link invalid 'this' to a Java object".

If i remove the plugin everything seems to work.

PeterStaev commented 7 years ago

Hey @adisoftbn , the error does not hint at a problem with the plugin, but more with the way you have it set up/use it. Can you provide more details where does this error happen?

adisoftbn commented 7 years ago

Hello,

Sorry for delay.

Everything works fine if i dont use --bundle.

If i install webpack and use the --bundle option at build, It breaks at "_super.apply(this, arguments);" from line 37(drop-down.android.ts) with the error "Trying to link invalid 'this' to a Java object". If I remove the plugin(and another plugin which seems to have the same problem) from the project it seems to work

I have an angular project. I tried to reproduce the issue on "https://github.com/PeterStaev/ng-test-bed.git" but I need to update it to the latest version of angular2 because there seem to be some issues when running it like it is now... I will try to get free time to update it tomorrow.

PeterStaev commented 7 years ago

Hey @adisoftbn , I've just published a new version on NPM (1.3.3) with a possible fix for this. Can you try to upgrade the plugin in your project and see if the problem still persists?

adisoftbn commented 7 years ago

Sorry for the delay :D I had a lot of other problems to solve.

I can confirm that there isn't any other issue with webpack. Everything works flawless :D

Best regards !