saltyshiomix / nextron

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

Shared libs #378

Open kouji-dev opened 1 year ago

kouji-dev commented 1 year ago

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:

alexis-piquet commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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