ES6 is not supported after Electron packaging

#1

I’m using various ES6 syntax (such as import etc.) & React code (JSX) in my Electron-based application. During the development, I’m using the electron-prebuilt-compile package (as a dev-dependenvy) in order to support these new features and it works perfectly fine without any errors.

But after packaging my app using the electron-packager package and running the distributable application file, I experiencing unsupported ES6-related errors such as:

Unexpected token import
That’s is how I run the electron-packager command (notice to the platform & architecture flags):

electron-packager . MyCoolApp --platform=linux --arch=x64
Any reason why a packaged/distributable version of my application does not support ES6/React features?

0 Likes

#2

Same issue here!
any solution?

0 Likes

#3

I’ve answered this question at StackOverflow, here you go: [https://stackoverflow.com/a/49600407/952310](http://ES6 is not supported after Electron packaging)

0 Likes