-
-
Notifications
You must be signed in to change notification settings - Fork 382
Babel doesn't watch for file change #38
Comments
I agree with this. I can see that This was how I decided to setup my scripts. It restarts upon file changes and transpiles the code (using babel) correctly:
|
@bryandbor Thank you for help! It works nicely. but it seems little bit slow because it builds whole code for every changes. Do you think any better solution exist? |
@ifndefdeadmau5 Maybe this could work. |
@ifndefdeadmau5 I think the solution you want is something like
So what happens here - we just say nodemon to look for the initial file which is |
@SmolinPavel Thank you for the solution. Just to note that Babel do not recommend using
|
@SaulSilver Oh yeah, good shout! 👍 Thanks |
You can set up your scripts like this:
and run them in separate terminals; yarn watch or npm run watch will watch changes on src folder and yarn dev or npm run dev will run the compiled file with nodemon. 🙏 |
For now I just restart manually after making changes because babel doesn't automatically transpile original code when changes are made.
So basically I feel getting no benefits from using nodemon from this setup.
Should I use another library for watching purpose?
The text was updated successfully, but these errors were encountered: