Comments (3)
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.
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.
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)
- error with ignored file HOT 6
- Error: Cannot find module '@babel/core' (Installing it didn't do anything) HOT 1
- Release needed HOT 3
- How to disable ">>> RESTARTING <<<" message? HOT 3
- why it's faster than the combination of nodemon and babel? HOT 1
- document is not defined HOT 2
- ipranges.json in NPM module HOT 2
- Not restarting when making changes to .graphql files HOT 6
- Watcher is still initialized for files that are ignored HOT 5
- Extension list formatting HOT 1
- TypeError [ERR_INVALID_ARG_TYPE]: The "fd" argument must be of type number HOT 2
- JavaScript API? HOT 1
- Support for root-mode option
- babel-watch announcing SIGHUP
- Process doesn't stop on SIGTERM HOT 3
- Unable to transpile node_modules HOT 4
- Application doesn't restart automatically
- Babel-errors are not forwarded to stderr HOT 5
- Degradation after refactoring and another uncaught error location HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-watch.