I just wanted start a new project using babel and ES2016 so i can use await async in new project. In babelrc i put following:
{
"presets": [
"es2016",
"stage-0"
]
}
And than in index.js i have:
require('babel-core/register')()
require('babel-polyfill')
require('./bin/server.js')
But now in server.js it fails when i run the app, at first line because of import:
import Koa from 'koa'
Saying that it does not recognize "import". The packages i installed are babe-cli, core, polyfill,preset-es2016, preset-stage-0 and babel-register. Am i missing something or what am i doing wrong?