asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
127 stars 67 forks source link

How to ignore specific resource files? #31

Closed yukuan1988 closed 5 years ago

yukuan1988 commented 5 years ago

I use npm to manage libraries and webpack to build my resources. Is there a way to tell astilectron to ignore specific resources while building, say node_modules?

asticode commented 5 years ago

@yukuan1988 have you tried using the ResourcesAdapters? It allows executing specific commands in which paths you provide are relative to the resources folder.

During the bundle process, resources are copied to a temp folder in which those specific commands are executed. Therefore what you could try is remove folders and files you don't need using a ResourcesAdapter, that way they won't be binded to your binary.

Does that make sense?

yukuan1988 commented 5 years ago

It works, thanks!