devtool
devtool copied to clipboard
Babel6 support
Hello! So my server is currently run with:
"scripts": {
"start": "npm-run-all --parallel lint server:development",
"test": "echo \"Error: no test specified\" && exit 1",
"server:development": "nodemon ./server/ --exec babel-node ..."
},
How does this fit into the system?
I just added an ES2015 example. You could use a custom HTML index that registers babel, or you could just have your application entry point register babel.
https://github.com/Jam3/devtool/blob/master/example/es2015.js https://github.com/Jam3/devtool/blob/master/example/es2015.html
Another approach is to use babel to transpile your src/
folder (perhaps incrementally, if possible), and then have devtool
just watch the dist folder.
devtool dist/index.js --watch dist/**/*.js
So for those looking for a s similar situation here's what I did:
- Enable babel6 source mapping (.babelrc, "both")
- Build your babel source
- Run against build source
Still trying to figure out how to integrate this with nodemon.
A note, you can take advantage of node 5 features in electron - if you already do in your prod environment. So you can use the babel 6 preset babel-preset-es2015-node5
just fine. (as per my PR)