Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import native node module + dylib file #369

Open
idevelop opened this issue May 23, 2023 · 2 comments
Open

Import native node module + dylib file #369

idevelop opened this issue May 23, 2023 · 2 comments
Labels
question Further information is requested

Comments

@idevelop
Copy link

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!

@idevelop idevelop changed the title Import native module + dylib Import native node module + dylib file May 23, 2023
@alexis-piquet
Copy link

alexis-piquet commented Jun 3, 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?

@alexis-piquet
Copy link

@idevelop would you need help?

@saltyshiomix saltyshiomix added the question Further information is requested label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants