# electron-template **Repository Path**: xiaoxin6a/electron-template ## Basic Information - **Project Name**: electron-template - **Description**: electron项目模板 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-24 - **Last Updated**: 2025-06-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### node版本 node v18.20.4 ### pnpm版本 pnpm v9.10.0 ### 安装vscode插件 1. Vue - Official 2. Tailwind CSS IntelliSense ### 安装依赖,推荐使用pnpm + 梯子安装依赖,使用镜像有可能会无法安装 ```shell pnpm i ``` ### 打包程序,推荐使用pnpm + 梯子打包,使用镜像有可能会无法打包 ```shell pnpm run build ``` ### 设置控制台中文不会乱码 ```shell chcp 65001 ``` ### 新窗口设置标题无效? - 页面标题会覆盖electron的title,请在router中设置。 ### 管理员运行 ```json "win": { "requestedExecutionLevel": "requireAdministrator" } ``` ### 开发环境运行时出现 Could not resolve "bufferutil" imported by "ws". Is it installed? / Could not resolve "utf-8-validate" imported by "ws". Is it installed? ```shell npm install --save-optional bufferutil utf-8-validate ``` - 注意,打包时需要将package.json下的去除,不然会打包失败。 ### 打包兼容win7/8版本 1. 在package.json中修改electron版本号 ```json "electron": "^22.3.27" ``` 2. 安装依赖 3. 去除package.json中的 "type": "module"