0

I'm trying out the creation of an application built on top of StrongLoop's Loopback. I prefer to use ES6 features if possible, but when using Arc to start the server, it chokes on ES6 syntax.

Is there a way to configure an application to use the Node harmony flags when starting through arc? I'd prefer to not use a transpiler.

Jacob
  • 77,566
  • 24
  • 149
  • 228

1 Answers1

0

Try setting the "start" script to "node --harmony ." in your package.json. Like so:

"scripts": {
   "pretest": "jshint .",
   "start": "node --harmony ."
}

This worked for me.

Jacob
  • 77,566
  • 24
  • 149
  • 228
Michael Schock
  • 575
  • 5
  • 8
  • It doesn't seem that `arc` uses npm scripts. Legitimate if you are manually starting without that tool, though. I ended up abandoning loopback because of its lack of flexibility and am doing what you suggested. – Jacob Jul 07 '15 at 15:58
  • It worked for me. I threw in a generator and ran `arc` and it wouldn't build. After adding in the script and running `arc` again, it built successfully (in the GUI). – Michael Schock Jul 07 '15 at 16:20
  • Awesome, so `arc` uses an npm `start` script if it exists? Good to know. – Jacob Jul 07 '15 at 16:21