I've migrated from ES 6 import, export, to CommonJS Module, before my package.json script section was :
"start": "NODE_ENV=development nodemon ./src/server.js --inspect --exec babel-node -e js"
and now:
"start": "NODE_ENV=development node ./src/server.js"
and all is working well and fast, but what does " --inspect --exec babel-node -e js" is just for nodemon?
I'm using node8 and it works really well for all my es6, es2017, without import/export. I really don't it need anymore. Am I correct?
--inspect
is for debugging purpose,whereas the --exec babel-node
command is for starting the app in development mode (letting Babel interpret ES6 code).
Nodemon is a daemon to watch for file change and restart the server.
For more details read:
Hope this helps.