1

I have a problem. I want to set up the minimize, maximize and close buttons on a frameless window but I can't due to this problem importing the electron remote. Thanks.

import { remote } from "electron";

 methods...

 closeWindow() {
  var window = remote.getCurrentWindow();
  window.close();
}

enter image description here

1 Answers1

0

Just import it like that:

const { remote } = window.require('electron')

and after that your code:

methods...    
closeWindow() {
  remote.getCurrentWindow().close();
}
HabibSay
  • 1
  • 2