electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Electron binary doesn't respect CLI arguments #270

Open Skysplit opened 6 years ago

Skysplit commented 6 years ago

When trying to run node_modules/.bin/electron -r babel-register . package interprets -r as directory argument and fails to start.

It would be nice to respect electron CLI arguments with electron-compile

malept commented 6 years ago

I'm not sure why this issue is filed in electron-compile when you're referring to the electron script. They're two different modules.

Skysplit commented 6 years ago

With pure electron it seems fine. After installing electron-prebuilt-compile this one does not work.

malept commented 6 years ago

OK. Why do you need to run babel-register with electron-prebuilt-compile, when it does that for you?

Skysplit commented 6 years ago

I'd like to use import statement in Main Process (and other es6 features). Only solution I found was using babel-register.

malept commented 6 years ago

You don't need to use babel-register, see https://github.com/electron/electron-compile#how-do-i-set-up-babel--less--whatever-the-way-i-want