babel.js unexpected token import

I’m converting a Meteor app to raw Node.js app with ‘react-redux-starter-kit’ which include Webpack. And I’ve added ‘lodash-es’ in the project as a dependancy to use es6 syntax. After that, when I transpile the project, the error message ‘unexpected token import’ comes up.

According to Babel.js , it is a bug when you try to transpile code like below with transform-runtime.
export * from 'x'

And here is the workaround for me.

npm install --save-dev babel-preset-es2015

.babelrc

{
"passPerPreset": true,
"presets": ["es2015"]
}

refer:
https://www.google.co.kr/search?q=import+_Object%24defineProperty+from+%27babel-runtime%2Fcore-js%2Fobject%2Fdefine-property%27%3B&oq=import+_Object%24defineProperty+from+%27babel-runtime%2Fcore-js%2Fobject%2Fdefine-property%27%3B&aqs=chrome..69i57.1553j0j7&sourceid=chrome&ie=UTF-8
https://github.com/babel/babel-loader/issues/195#issuecomment-246900259
https://github.com/babel/babel/issues/2877#issuecomment-245402025
https://www.google.co.kr/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=babel+js+unexpected+token+import&*
http://stackoverflow.com/questions/35040978/babel-unexpected-token-import-when-running-mocha-tests

Don’t add a custom prototype to Array.

If you want to add your own prototype to Array. You have to remember that DO NOT USE ‘for (in)’ statement. Because the statement will show not only items in array but also your custom prototypes.

You can test it by below code in chrome console.
Damn.. I struggled with this day long.

Array.prototype.someFunc = function(){
  return 'someFunc';
};
var arr = [1, 2];
for (var k=0, max=arr.length; k<max; ++k){
	console.log(11, arr[k]);
}
for (var i in arr){
	console.log(22, arr[i]);
}

result:
11 1
11 2
22 1
22 2
22 function (){
  return 'someFunc';
}