From e632d8b9abe3ee1a553d693c00997824464a3556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Wed, 2 Sep 2020 09:19:15 +0800 Subject: [PATCH] chore: update --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 35a0c3f..f46584b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ Electron、vue、vite 整合 - npm run dev - npm run build +## 踩坑记 +- import { write } from 'fs' 的这种形式会被 vite 编译成 /@modules/fs?import +const { write } = require('fs') 这种形式就能用了 😉 +- const { ipcRenderer } = require('electron') 同理 + --- ![](https://raw.githubusercontent.com/caoxiemeihao/electron-vue-vite/master/screenshot/800x600.png)