I am trying to build an app that serves up a React frontend from a Koa backend server. It's the first project I've done with Node.I would like to enable the use of ES6 import/exports in my project. I have found a number of resources that say that capability is built into recent versions of Node. I've found mentions of running node with the --harmony flag. And, I have found umpteen zillion tutorials that each show a different way of setting up Koa with babel. I've tried all of them and can't get it to work - possibly because many of them are old tutorials.As of today (April 2019), what is the cleanest, most correct way to enable imports/exports and possibly other such ES6 features in Node? Is babel still necessary at this point?I can install any Node version I want for this. I am inclined to go with the current LTS version (10.15.3) because LTS. If necessary, though, I can go with 11.14.0.
Submitted April 19, 2019 at 06:30PM by FlexNastyBIG
No comments:
Post a Comment