-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cant import { mainReduxBridge } #6
Comments
hey there @automationghost, do you have a repo to share? alternatively: i’ve recently revamped the boilerplates and provided scripts to get them:
they might help with this initial proof of concept (: |
This is the boilerplate. https://github.com/cawa-93/vite-electron-builder maybe you can take a quick look on the ts configs and tell me what your aproach would be. I think its mainly about the
settings ... I tried changing it to nodenext as you have it .. but then it breaks some of their stuff :D... You could basically install taht boilerpalte and try to install the mainbridge to see the problem the configs are in the packages folders |
i won’t be able to check this until next week.. hold tight.. |
ok no worries . I will try buidling a variation of electron-redux with persiting the state via a json file until then . I would like to try both your version and mine see how it goes . Maybe I use both. have a nice weekend |
I spent whole day re-creating my own version of redux-electron. damn my brain is fried after this ipc pingpong :D .... but it works. I used redux persists with electron store for the main process I have 2 middlewares utility functions : i can plug initilizeRendererListeners to any new window I create so pretty convienent. and i can debug with redux extension in the frontend ... |
i have found the problem > the npm package seems to have a problem with the dist folder so the import statement is wrong :) though i checked your package.json ... guess all is setup correcetly there .. still not sure whats going on :D import { mainReduxBridge } from "reduxtron/main"; i leave it to you |
this might help: https://github.com/vitordino/vite-electron-builder-reduxtron i couldn’t find a perfect way to make both typescript and the bundler happy that quick.. so i did the age old trick of using i’ve also noticed that although it claims:
looks like any exposed on a personal note: the magic is that |
Thanks . I will give it a go some sometime. So far im fine with this boilerplate. looking at vscode repo for inspiration. I want to build a extension system as a final goal down the road ... just researching takes me hours at the moment .. but its good fun. Thanks again. |
alright, let me know if you need anything else |
Greetings I cant import main mainReduxBridge in my project . ( also cant import preloadReduxBridge )
im using electron-vite-builder and the tsconfig there seems to cause the issue
I dont want to mess with their config ... so im not sure what to do :)
im currently debating if I build my own solution for handling state across multiple windows ...
already fiddled around abit . handling the state in the main process seemed like a good solution for me ... also I would need to persist the data and be able to debug / connect to the redux store ...
Previously I expermented with having a renderer store only .. but it got abit messy sharing the the state .. as there is no single source of truth .. still found a solution to that .. but wasnt happy ... so i ended up looking into other solutions ... electron-redux didnt seem to work with preload script / context isolation .. and reduxtron gave me trouble with import ... yeah :)
The text was updated successfully, but these errors were encountered: