I have published a gist for those who struggle with the babel build when developing on multiple platforms. If you have any problems with the script or suggestions for improvements, do not hesitate to comment. The gist is MIT licenced, so feel free to use it anywhere.

Note, that you need to change to paths in line 48 and 59, if your sources are in a different folder than lib. This is due to my naming conventions in developing npm packages. I include the script in my package.json in the following way.


"scripts": {
"build": "node build.js",
"prepublish": "npm run build",
"test": "mocha --timeout 15000 --compilers js:babel-core/register --recursive \"lib/**/*.tests.js\"",
"test:watch": "npm test -- --watch"

Jan Küster

I have graduated in Digital Media (M.Sc.) at the University of Bremen. After working as a consultant I am now developing the next level of leaning software with Meteor.

Leave a Reply