https://linen.dev logo
Join DiscordCommunities
Powered by
# react
  • a

    ambitious-knife-25690

    09/17/2019, 10:22 AM
    But adding or removing the
    @:jsRequire
    seems to not help the situation at all
  • a

    ambitious-knife-25690

    09/17/2019, 10:23 AM
    (in the case of firestore - as that is all i'm testing atm)
  • a

    ambitious-knife-25690

    09/17/2019, 10:32 AM
    Ah it seems like
    @:jsRequire
    isn't correct anymore
  • a

    ambitious-knife-25690

    09/17/2019, 10:32 AM
    If I add
    import "@react-native-firebase/firestore";
    to the compiled output it works
  • a

    ambitious-knife-25690

    09/17/2019, 10:32 AM
    Is there a way to mimic imports like this?
  • a

    ambitious-knife-25690

    09/17/2019, 10:32 AM
    Short of macros
  • a

    ambitious-knife-25690

    09/17/2019, 10:32 AM
    I don't think that would be the best solution for a library?
  • u

    user

    09/17/2019, 10:45 AM
    https://philippe.elsass.me/2017/11/using-npm-modules-from-haxe/
  • a

    ambitious-knife-25690

    09/17/2019, 10:49 AM
    It also appears like the import hack didn't actually accomplish what I wanted anyway
  • a

    ambitious-knife-25690

    09/17/2019, 10:50 AM
    The guide doesn't really help, I've added the appropriate jsRequires but for some reason it isn't working
  • a

    ambitious-knife-25690

    09/17/2019, 10:51 AM
    Although I guess I learned that import == require
  • u

    user

    09/17/2019, 10:52 AM
    Can you try with
    @:jsRequire('@react-native-firebase/firestore', 'default')
    ?
  • a

    ambitious-knife-25690

    09/17/2019, 11:10 AM
    @User No difference
  • a

    ambitious-knife-25690

    09/17/2019, 11:11 AM
    Looking at the compiled output the compiler is omitting the require for some reason...
  • a

    ambitious-knife-25690

    09/17/2019, 11:12 AM
    as in there's no defintion like the following:
    var react_native_firebase_Firebase = require("@react-native-firebase/app");
  • a

    ambitious-knife-25690

    09/17/2019, 11:12 AM
    for the firestore extern
  • a

    ambitious-knife-25690

    09/17/2019, 11:13 AM
    Previously all I needed to do was just reference the location for the firebase entry point :/
  • u

    user

    09/17/2019, 11:13 AM
    Oh wait I misread your screenshot
  • a

    ambitious-knife-25690

    09/17/2019, 12:04 PM
    Yeah the structure is a bit confusing now
  • a

    ambitious-knife-25690

    09/17/2019, 12:04 PM
    Can't seem to figure it out
  • a

    ambitious-knife-25690

    09/17/2019, 12:04 PM
    I tried
    @:keep
    for
    Firestore
    but that made no difference
  • a

    ambitious-knife-25690

    09/17/2019, 12:04 PM
    it's still getting omitted during compilation even if I am using the extern class
  • a

    ambitious-knife-25690

    09/17/2019, 1:42 PM
    @User I think you got it lol
  • a

    ambitious-knife-25690

    09/17/2019, 1:42 PM
    I ran the hacky macro inserting the
    import
    at the top of file and I was still failing to get access to
    Firestore
    even though
    Firebase
    was getting picked up
  • a

    ambitious-knife-25690

    09/17/2019, 1:43 PM
    I needed to resolve firebase to
    default
  • a

    ambitious-knife-25690

    09/17/2019, 1:43 PM
    Thanks!
  • a

    ambitious-knife-25690

    09/17/2019, 1:44 PM
    OH WAIT
  • a

    ambitious-knife-25690

    09/17/2019, 1:44 PM
    I just removed my hacky macro and firestore isn't findable
  • a

    ambitious-knife-25690

    09/17/2019, 1:44 PM
    The macro appears to be required?
  • a

    ambitious-knife-25690

    09/17/2019, 1:44 PM
    Otherwise it does this
1...161718...80Latest