-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: