nextron icon indicating copy to clipboard operation
nextron copied to clipboard

Shared libs

Open kouji-dev opened this issue 1 year ago • 3 comments

I have a project where I have shared entities using typeorm and for SSR pages I would love to fecth those entities using typeorm datasource. The problem is the same code used by SSR is also used by the main process, therefore I have created a folder outside renderer and main in order to share it between them. But when i try to run the app, it says I need to install a compatible loader for those files as it doesnt recognize @

the suitable folder structure:

  • main
  • renderer
  • shared (common libs)

kouji-dev avatar Jun 10 '23 16:06 kouji-dev

Hey nice to read you @kouji-dev.

I've already helped on this subject let me create a discussion Show and Tell about that. Here you can find the issue.

alexis-piquet avatar Jun 22 '23 08:06 alexis-piquet

Show and Tell created, don't hesitate to close close your issue if it works on your side, if not I'll be available to continue to explore your issue with you.

alexis-piquet avatar Jun 22 '23 08:06 alexis-piquet

To give you more context about my use case (in a associative project), I've created a library to do database basics interactions and define my models ect... You can find it here

alexis-piquet avatar Jun 22 '23 09:06 alexis-piquet