DEV Community

Discussion on: Create Your First React Desktop Application in Electron with Hot-Reload

 
weslleysauro profile image
Weslley Rocha • Edited

I could access the fs module via de window.require('electron').remote then get the fs .

const app = window.require('electron').remote
const fs = app.require('fs')

export const saveFile = () => {
  fs.writeFileSync('./test.txt', 'hello-world')
}