Merge pull request #88 from zhoufeifan/patch-2

chore: import on demand
This commit is contained in:
草鞋没号 2022-03-31 15:04:47 +08:00 committed by GitHub
commit 410c8b98ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import fs from 'fs'
import { lstat } from 'fs'
import { cwd } from 'process'
import { ipcRenderer } from 'electron'
// Usage of ipcRenderer.on
@ -7,7 +7,7 @@ ipcRenderer.on('main-process-message', (_event, ...args) => {
console.log('[Receive Main-process message]:', ...args)
})
fs.lstat(process.cwd(), (err, stats) => {
lstat(cwd(), (err, stats) => {
if (err) {
console.log(err)
} else {