electron-builder is a popular option and can be quite handy! However, it’s a third party application that wraps up a number of Snapcraft capabilities which can sometimes add challenges for complex projects.
If you are currently using elecron-builder, then I’d suggest you continue to do so unless it presents a problem
My point is if I had to choose one approach I would definitely choose continuing to build snaps the same way that I’ve been doing so far (using electron builder), because it wouldn’t change nothing for me.
However, and considering that my use case is to run this snap in a ubuntu core machine and integrating it with mir-kiosk, I’m slightly concerned about what expecting from this snap once I install it (in the ubuntu core machine which has also installed mir-kiosk). I didn’t specified any plugs (although I know that I could do it).
Does anyone knows if electron builder does this specification per si or should I do it manually? And what would be expected if I install my snap and run in the final machine? Should the integration with mir-kiosk be straightforward or should I anticipate any problems?
While electron-builder is a fine thing for standard stuff, it really gets tricky if you want to do something that requires a bit more adjustments, overrides and tweaks for a specific use-case … electron-packager is definitely a lot more flexible, i do all my electron snaps with electron-packager nowadays … here is an example:
What the others before me mentioned is definitely correct. If you want the power of electron builder for packaging the node stuff combined with the flexibility of your own snap.yml, you can also configure electron builder with the dir target, creating an unpackaged distribution for linux, and then wrap that in your snap.yml. That’s what we do in the UBports Installer: