export default config = {
apiUrl : "http://localhost:7543"
}
$ node --version
v6.7.0
Is this possible without transpiling? Is there a way to polyfill in import without having to change my code?
I'd like to pull that in to the console (REPL) and see if the object is set up right. But:
import {config} from './config';
^^^^^^
SyntaxError: Unexpected token import
It looks like I can't use import in the REPL yet. So what's the alternative? Do I need to use ES5/Node require
? Is there a polyfill that I can add in to my loader for Nesh?
Ideally I'd like to just open up node
console and use paste in a line that uses import
without having to change my code.