Eel: How Eel work with Vue?

Created on 12 Jul 2018  路  9Comments  路  Source: ChrisKnott/Eel

I like Eel,it help me out of annoying python gui work.Actually i'm using electron-vue as my GUI,that means i run a electron to interactive with user and run a python web frame(Flask now) to deal with tasks.
I prefer write my web with Vue,But when i run python with eel,the built files(.vue) are not auto injected,So now i want to know whether Eel can work with Vue and how?

Most helpful comment

When I use eel.expose in my Vue code, it works on my dev server perfectly. However, when I build the app for production, the code is minified and the function names change, breaking the exposed functions. Is there a way to explicitly define the name of the functions that we expose?

Something like:

eel.expose('myFunctionName', function() {
  ...
});

Edit: I've looked at the source code and there is already a way to do this, but it's not documented. Check my pull request?

All 9 comments

It work perfect, we develop all frontend in vue. The only tricky thing is that i add a line to the index.html
for working with vue in development.

here is an example:
https://github.com/LarryGF/Lilipad_2.0

modification to index.html:

`






Related issues

TheBdouilleur picture TheBdouilleur  路  5Comments

datainvestor picture datainvestor  路  5Comments

logxseven picture logxseven  路  6Comments

ghost picture ghost  路  6Comments

Jack-Stoller picture Jack-Stoller  路  6Comments