A fast file watcher and restarter for babel-node apps. Instead of restarting babel-node on each change (which is slow), it runs babel transpilation once in a master process and spawns a plain node child with the transpiled code. Current stable version is 7.8.1, with a maintenance release cadence. Key differentiators: autowatch (automatically watches files as they are required), faster restarts than nodemon+babel-node, and supports Babel 7.
npm install babel-watchNo compatibility data collected yet for this library.
Installs babel-watch as a dev dependency and creates an npm script to run it with a source file.
Update Node to >=8 and install @babel/core@^7.
Use --ignore 'node_modules' along with other patterns, e.g., --ignore 'node_modules,dist'.
Use --inspect 0.0.0.0:9229 instead of --inspect=0.0.0.0:9229.
Replace -d with --inspect and -B with --inspect-brk.
Pass -x node_modules to exclude node_modules from autowatch.
Update babel-watch to v7.5.0 or later: npm install babel-watch@latest
Install @babel/core: npm install --save-dev @babel/core
Increase Node memory limit with --max_old_space_size, or exclude unnecessary directories with --ignore.
Use --inspect or --inspect-brk instead.
Specify a different port with --inspect 0.0.0.0:9230