Skip to content
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
@NathanaelA

Description

@NathanaelA

I have traced down a couple ios issues caused by webpack when running with multiple plugins:

  1. __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.
  2. 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.
  3. 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)
  4. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions