You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Where do I declare that these files must be copied into the built app and placed next to the final "background" bundle file so that it can import them?
How can I make this also work in dev mode?
Less of a priority, how do I coerce Typescript to understand what the native module import produces? Should I write a custom .d.ts file?
Thanks!
The text was updated successfully, but these errors were encountered:
idevelop
changed the title
Import native module + dylib
Import native node module + dylib file
May 23, 2023
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?
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 inbackground.ts
..d.ts
file?Thanks!
The text was updated successfully, but these errors were encountered: