Code Monkey home page Code Monkey logo

Comments (11)

gkz avatar gkz commented on June 6, 2024 1

The option relay_integration.esmodules has been added, and will be in a future version of Flow (it will be in the changelog once it's in). Once you have it, try it out and confirm if it works for you.

from flow.

SamChou19815 avatar SamChou19815 commented on June 6, 2024

It's hard to guess what's going on here. Can you give me an isolated repro?

from flow.

matclayton avatar matclayton commented on June 6, 2024

Sure, it’ll be the next day or so. Sorry I was hoping this was a known issue. Ill make a repro with an example.

from flow.

SamChou19815 avatar SamChou19815 commented on June 6, 2024

I think I can guess what's going on. Flow's relay integration is not designed with eagerEsModules: true in mind, so you might need to disable this flag. This flag is not enabled internally, so we don't notice it.

@gkz who worked on the integration. To fix it, I think we just need to add another flag similar to this relay flag, and do an additional transform on the module type.

from flow.

matclayton avatar matclayton commented on June 6, 2024

That would make a lot of sense, sadly disabling the flag on our end makes swapping over to viteJS (from webpack) a lot harder, we haven't actually managed it, so we were hoping to go all in on ESM and this is the remaining blocker.

Do you still need a repro case? Or is this likely to get resolved? If it isn't no worries I understand the focus on FB's internals needs, but it would be good to know so we can double our efforts to either get commonjs working on vite.

from flow.

gkz avatar gkz commented on June 6, 2024

Where did you learn about the relay integration options? As far as I am aware, they are not documented or announced.

from flow.

matclayton avatar matclayton commented on June 6, 2024

Can't really recall, I think we initially saw them in this issue facebook/relay#3717 then read the code and release notes, we've been running them for quite a long time, its very very helpful. I recon we've had them on for 2+ years now or coming up to that, so my memory is a little fuzzy.

from flow.

gkz avatar gkz commented on June 6, 2024

Interesting, wasn't aware that anyone in the public was using these options.
Will take a brief look to see if this is easy to add.

from flow.

matclayton avatar matclayton commented on June 6, 2024

Thank you, I would offer to help, but as much as I can read ocaml, you really dont want any ocaml we write :)

This feature is one of the main reasons we've stuck with flow over typescript, so so useful, so thank you for adding it!

from flow.

matclayton avatar matclayton commented on June 6, 2024

Thank you! We have a few version bumps to get though (LTI) , but will try it out as soon as we can

from flow.

gkz avatar gkz commented on June 6, 2024

If you're having trouble with rolling out LTI you can post in our Discord https://discord.gg/YpwbdyqQ

from flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.