Please describe your issue:
I'm trying to enable ES6 modules using electron-forge start -- --experimental-modules but I'm getting the following output:
error: unknown option `--experimental-modules'
I'm using Git Bash on Windows 10.
What version of Electron Forge are you using?
Also, what version of Electron are you using?
@malept Here you go:
C:\Users\richi>node -v
v12.4.0
C:\Users\richi>npm -v
6.9.0
C:\Users\richi>yarn -v
1.16.0
C:\Users\richi>electron -v
v5.0.5
C:\Users\richi>electron-forge --version
√ Checking your system
6.0.0-beta.39
What is the Electron version in your project? (See package.json)
On a related note: you should avoid installing Electron globally.
@malept It's on version v5.0.5.
Here's all the other packages I am using.
I think you're supposed to put --experimental-modules in the NODE_OPTIONS environment variable, but that doesn't work when you package the app.
If you want ES Module support, your best bet is esm with minimal changes.
Node.js 13.2.0 recently removed the --experimental-modules flag, making ES Modules enabled by default. 🎉
So we'll have it by default once Electron starts using Node 13.2 or higher.
Most helpful comment
Node.js 13.2.0 recently removed the
--experimental-modulesflag, making ES Modules enabled by default. 🎉So we'll have it by default once Electron starts using Node 13.2 or higher.