asticode / go-astilectron-bootstrap

Create a one-window application using Astilectron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not Bundle files for development purposes (React)

ArFe opened this issue · comments

commented

I'm developing an application that uses go-astilectron, go-astilectron-bootstrap and go-astilectron-bundler, and React.
What I'm doing is building the React application and placing in ./resources/app.

All works fine (except I had to change "astilectron.onMessage" to "window.astilectron.onMessage" to be able to compile).

The main problem is the boostrap replaces everything on my app folder, if I don't run the bundler.
To make it worse, I have to run my application as root, so it changes the ownership of the resources folder.
So I have to run "npm run build" with root as well.

Maybe there is a way around and I can't see it now, but I'd like to run (prior to bundle), the application without copying/restoring/checking the files.
I couldn't find enough documentation to understand exactly how the bootstrap and the bundler work.

Thanks in advance.

When still in development stage, you shouldn't need the bundler. What you can try is comment the Asset, AssetDir and RestoreAssets attributes in your bootstrap options, and that should tell the bootstrap not to execute any kind of provisioning 👍

Let me know if that fixes your issue.

commented

Thanks, it did work. I tried using the default bind.go, but that didn't work.
Using the bundler from the get go makes it easier to handle the project, IMO.