I'm trying to make an app in Electron js but the url doesn't load. The problem is in the format () function which appears strikethrough. It is apparently deprecated (@deprecated -- since v11.0.0 - User the WHATWG URL API). I need help!
...
app.on('ready', function() {
mainWindow = new BrowserWindow({});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'mainWindow.html'),
protocol: 'file:',
slashes: true
}));
});