Closed Psycokwet closed 3 years ago
By updating next, I have now access to the window object !
Updated by : yarn add -DE next react react-dom
Fixed the non component error by
module.exports = {
webpack5: false,
webpack: (config) => {
return config;
}
}
in next.config.js:
Credit to @hypernova7 that helped me in another issue !
I have discovered that by using a preload.js file, we could use the window object. Here, I set up an alert that load on the loading of the document
Here ie my preload.js
The problem is, I need the window object in my react code, not here. I need it to load a webview, or anything that could allows me to load a lib which need the window object as well.
How could I make the window object available anywhere in my renderer ?
This trick is the most I succeeded to do, it's been a while since I've been trying pretty much anything I could to import this lib, unsuccessfully.
Thank you for your attention.
If anyone could suggest an easy to use SIP <=> PSTN lib usable with nextron, I take it too. The one I have is easy to use with vanilla electron, and certainly vanilla react, but with the configuration of Nextron, I can't find a way to use it. But I'm certainly missing something here.