saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.69k stars 215 forks source link

Import native node module + dylib file #369

Open idevelop opened 1 year ago

idevelop commented 1 year ago

I'm setting up an Electron app that needs to be able to import a custom native node module (a something.node file) that itself loads a dynamic library (a separate, libsomething.dylib file).

I already have the pipeline to produce these two files, but I'm having trouble adding them into the nextron project. Effectively they should be treated as static files that should be able to be loaded via standard require from the code in background.ts.

Thanks!

alexis-piquet commented 1 year ago

Hey @idevelop,nice to read you. Could you share a use case? Whats your libs contains, components, hooks, or backend things? Where would you want to load them?

alexis-piquet commented 1 year ago

@idevelop would you need help?