This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Bundler causes serious weird/crashing issues with ios ng apps with several plugins. #8
Closed
Description
I have traced down a couple ios issues caused by webpack when running with multiple plugins:
- __extends will run on NSObject code even though, I believe you hijack it normally inside the
https://github.com/NativeScript/ios-runtime/blob/b7b8d69c1857d6d6293b1e33c60ac6980a4161e3/src/NativeScript/ObjC/Inheritance/ObjCTypeScriptExtend.mm#L49 -- I don't know if this is an issue for sure; but in the webpack'd code -- when this runs, it attempts to run the __() which set the this.constructor (this.constructor = d;) which when the code is set to "use strict;" will cause it to crash. This is NOT an issue if the file isn't web packed. (In fact in my tests, the normal JS __extends --- __() constructor code does not appear to be ran against a NSObject at all); however in a webpacked version the code is ran which is what causes the failure. - the Constructor itself https://github.com/NativeScript/ios-runtime/blob/b7b8d69c1857d6d6293b1e33c60ac6980a4161e3/src/NativeScript/ObjC/Inheritance/ObjCTypeScriptExtend.mm#L34 is supposed to be hijacked by this regex; but the regex breaks on webpacked code, and so the _super.apply is ran. A NSObject based object in NS 2.1 doesn't have a .apply() function; which will cause the app to crash when it attempts to run it.
- WebPack can't seem to understand the radlistview listview from ng2 code, it can't seem to resolve the file/folder properly. (Renaming listview.ios.js to listview.js inside the rad listview folder allows it to works)
- Using a NPM link on the nativescript-angular folder will cause serious webpack pathing issues -- it appears to be trying to go up to the parent folder of where the final symlink is at; rather than the parent folder inside the node_modules (finally manually just deleted the link, and copied the rc4 version folder manually into the node_modules folder)
Metadata
Metadata
Assignees
Labels
No labels