Git Product home page Git Product logo

Comments (7)

jfrolich avatar jfrolich commented on August 10, 2024

If you are using template tags we need an inline require(..) to make it work reliably because ReScript doesn't have support for template tags. You can use templateTagAsFunction which is documented in rescript-apollo-client when you use a bundler that doesn't support require. It's a trade-off, template tags can have some benefits over strings. I would love to have a proper solution for this but I raised possible solutions in the rescript compiler that have not been addressed the past 2 years so I wouldn't hold my breath.

from graphql-ppx.

AlexMoutonNoble avatar AlexMoutonNoble commented on August 10, 2024

If the require is necessary can the exports be made to be commonjs instead?

from graphql-ppx.

AlexMoutonNoble avatar AlexMoutonNoble commented on August 10, 2024

im not recalling what a templateTag is

from graphql-ppx.

jfrolich avatar jfrolich commented on August 10, 2024

By the way, this shouldn't be a problem with webpack5, I have an webpack 5 website deployed that works fine. What is your configuration?

from graphql-ppx.

AlexMoutonNoble avatar AlexMoutonNoble commented on August 10, 2024

Hi Jaap
Sorry for the delay...I'm finding this issue again now looking for webpack alternatives.
The build system in question today is vite

from graphql-ppx.

AlexMoutonNoble avatar AlexMoutonNoble commented on August 10, 2024

(Not a pressing issue, but I would love to never see webpack again, personally)

from graphql-ppx.

AlexMoutonNoble avatar AlexMoutonNoble commented on August 10, 2024

ahh! templateTagIsFunction! found it

from graphql-ppx.

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.