Giter VIP home page Giter VIP logo

Comments (3)

STRML avatar STRML commented on June 11, 2024

Hi - the issue seems to be that the babel plugin embeds the definition of test.graphql into main.js. Dependencies from one file to another are not tracked and are not usually present in Babel. You can see that the definition changes correctly once you re-save main.ts.

You can run with DEBUG="babel-watch:*" npm start to see the full inner workings of babel-watch.

There is no way to avoid this in the current code. It is tempting to add a --no-cache option or similar, but doing so would essentially make this the same as running nodemon with @babel/register, as the cache is what makes babel-watch worthwhile.

I'm going to close this as a use case we can't support, unfortunately.

from babel-watch.

puchm avatar puchm commented on June 11, 2024

So essentially babel is caching it, not babel-watch? And because babel doesn't know that main.ts depends on the GraphQL file, it doesn't rebuild main.ts? Am I understanding this correctly?

babel-plugin-import-graphql has a runtime option, but it doesn't do anything as far as I tested it. I am going to open an issue there.

On a side note: Could you please look at the pull request I opened a few weeks ago? It's a totally different topic but I think it's useful and would be curious what you think about it.

from babel-watch.

STRML avatar STRML commented on June 11, 2024

babel-watch is caching it, by file. But while it invalidates the test.graphql cache, the reality is that main.js contains test.graphql, so removing the cache does nothing.

from babel-watch.

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.