Trouble with the --harmony switch


#1

The docs mention how to add the --harmony js switch to the renderer process. This is how I’m adding it:

app.on('ready', function() {
  app.commandLine.appendSwitch("js-flags", "--harmony");
  
  // open browser window etc
});

When I follow these instructions and start the app, I can see the flag when I inspect the process:

atom --type=renderer ... --js-flags=--harmony ...

But I cannot use any ES6 features in my JavaScript. All I’m doing is creating an arrow function but I get a syntax error so it obviously isn’t starting chromium with ES6 support.

Has anyone successfully tried to use the --harmony flag?


#2

Read this first https://github.com/atom/atom-shell/issues/1328 thank me later :wink: