python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.41k stars 586 forks source link

Eel unable to parse arrow functions when running after npm run build #674

Open honkwansin opened 1 year ago

honkwansin commented 1 year ago

Eel version 0.16.0

Describe the bug Eel cannot parse arrow functions such as: const funcName = (funcParam) => {console.log(funcParam)} window.eel.expose(funcName, 'funcName') after running npm run build and then python main.py. but when rephrased to function funcName(funcParam) { console.log(funcParam)} window.eel.expose(funcName, 'funcName') everything works fine.

To Reproduce

  1. Use CRA template (example/07)
  2. write an arrow function
  3. call it from python
  4. npm run build
  5. python YOUR_MAIN_FILE.py

Expected behavior both function styles should be parsed all the same

System Information

Screenshots

Additional context