-
Notifications
You must be signed in to change notification settings - Fork 47
Packing with Electron #44
Comments
Seems like the problem is that |
Just letting you guys know. I managed to make this work in a packed Electron app! \o/ The trick is, because This way, we'll have no problems refferencing phantom-script in a ASAR pack. Let me know if a PR is welcome! |
Hi @rcrodrigues, thanks for reporting this. Sure, a PR is very welcome if it don't breaks support for other systems. If you create one I will merge and publish as soon as I can. Please refer to this issue in your PR. Thanks, and best wishes |
Although I believe changing that line wouldn't break support for any other system ( once ASAR is used on Electron apps only ), I couldn't run the test to make sure. Anyways, I'll make a PR changing that line of code and documenting it so other developers can know this can work in Electron. Thanks, |
Hi guys, I'm trying to pack this lib in an Electron app for windows.
It works perfectly fine for Linux, but when I build de app on a windows env, it gives an error saying
"Can't open ...\node_modules\phantom-html2pdf\lib\phantom-script.js".
When debugging the convert method, I saw that it's using the "__dirname" to build the path to that script.
Problem is when on a ASAR packed application, it won't be accessible.
Any ideas for a workaround?
The text was updated successfully, but these errors were encountered: