diff --git a/CHANGELOG.md b/CHANGELOG.md index b15ca3b..ae93139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ### v1.0.3 (_2022-05-01_) -- fix: throw error when vite.config.* file in root ([#3](https://github.com/alex8088/electron-vite/issues/3)) +- fix: throw error when vite.config.\* file in root ([#3](https://github.com/alex8088/electron-vite/issues/3)) - feat: export splitVendorChunkPlugin from vite - perf: build target for Electron 19 diff --git a/README.md b/README.md index 90c9acb..a64139e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ function createWindow() { Clone the [electron-vite-boilerplate](https://github.com/alex8088/electron-vite-boilerplate) or use the [create-electron](https://github.com/alex8088/quick-start/tree/master/packages/create-electron) tool to scaffold your project. -``` bash +```bash npm init @quick-start/electron ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 4553163..3aafa10 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -13,11 +13,11 @@ ## 特性 -- ⚡️使用方式与 [Vite](https://vitejs.dev) 相同 -- 🔨主进程/渲染进程/ preload 脚本都使用 Vite 构建 -- 📃统一所有配置,合并到一个文件中 -- 📦预设构建配置,无需关注配置 -- 🚀支持渲染进程热更新(HMR) +- ⚡️ 使用方式与 [Vite](https://vitejs.dev) 相同 +- 🔨 主进程/渲染进程/ preload 脚本都使用 Vite 构建 +- 📃 统一所有配置,合并到一个文件中 +- 📦 预设构建配置,无需关注配置 +- 🚀 支持渲染进程热更新(HMR) ## 用法 @@ -87,7 +87,7 @@ function createWindow() { 克隆 [electron-vite-boilerplate](https://github.com/alex8088/electron-vite-boilerplate) 模板或者使用 [create-electron](https://github.com/alex8088/quick-start/tree/master/packages/create-electron) 脚手架来搭建项目学习。 -``` bash +```bash npm init @quick-start/electron ``` @@ -168,7 +168,7 @@ export default defineConfig({ - **target**:`node*`,自动匹配 `Electron` 的 `node` 构建目标,如 Electron 17 为 `node16.13` - **lib.entry**:`src\main\{index|main}.{js|ts|mjs|cjs}`(相对于根目录),找不到则为空 - **lib.formats**:`cjs` -- **rollupOptions.external**:`electron` 和所有内置 node 模块(如果用户配置了外部模块ID,将自动合并) +- **rollupOptions.external**:`electron` 和所有内置 node 模块(如果用户配置了外部模块 ID,将自动合并) #### `preload` 脚本编译项预设: