Node hot reload for imported modules.
It will not affect production builds (disabled when process.env.NODE_ENV === 'production'
)
From an idea of Kevin Simpler <3
npm i https://github.com/lsimone/node-hot-reload.git
While babel/webpack/typescript... are compiling in dist folder, NHR will watch that folder and reload the modules when they are changed (and traspiled).
import watch from 'node-hot-reload'
watch('dist')
If you are not using a transpiler and you are developing in src, just use
import watch from 'node-hot-reload'
watch('src')