codesbiome/electron-react-webpack-typescript-2024

Can't import ipcRenderer

codedepon opened this issue · 3 comments

Not being able to import ipcRenderer in any of the components. I think it's a webpack issue, but I'm not sure

@codedepon Can you elaborate more about the error you getting?
If you trying to access node specific stuff in renderer process, try the config mentioned here #18 (comment)

That is considered unsafe, I've found a workaround, but didn't have time to propose it, if you have time, I think this should be included in the boilerplate. Here's the solution electron/electron#9920 (comment)
Also it's outside of this topic, but it would be nice if there was a support for css modules, and I've already opened a discussion about it and described how they could be enabled.

That is considered unsafe, I've found a workaround, but didn't have time to propose it, if you have time, I think this should be included in the boilerplate. Here's the solution electron/electron#9920 (comment)

The safe approach of contextBridge.exposeInMainWorld() is already being used for custom window events in misc/window folder.


Also it's outside of this topic, but it would be nice if there was a support for css modules, and I've already opened a discussion about it and described how they could be enabled.

For the CSS modules approach, we will be testing the css-loader config you advised in discussion.