@tomjs/vite-plugin-electron 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -12
- package/README.zh_CN.md +5 -12
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> A Simple [vite](https://vitejs.dev/) plugin for [electron](https://www.electronjs.org), supports `esm` and `cjs`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Many thanks to [caoxiemeihao](https://github.com/caoxiemeihao)'s [vite-plugin-electron](https://github.com/electron-vite/vite-plugin-electron) and [Doubleshotjs](https://github.com/Doubleshotjs)'s [doubleshot](https://github.com/Doubleshotjs/doubleshot) These two excellent libraries inspired me. I hope to use it to simplify development configuration and focus only on business development.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -15,25 +15,18 @@ I learned [caoxiemeihao](https://github.com/caoxiemeihao)'s [vite-plugin-electro
|
|
|
15
15
|
- Support `main`'s `Hot Restart`
|
|
16
16
|
- Support `preload`'s `Hot Reload`
|
|
17
17
|
- Support `esm` and `cjs`, you can use `esm` in [electron v28+](https://www.electronjs.org/blog/electron-28-0)
|
|
18
|
-
- Support `vue` and `react` and
|
|
18
|
+
- Support `vue` and `react` and other [frameworks](https://vitejs.dev/guide/#trying-vite-online) supported by `vite`
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
|
-
With `pnpm`
|
|
23
|
-
|
|
24
22
|
```bash
|
|
23
|
+
# pnpm
|
|
25
24
|
pnpm add @tomjs/vite-plugin-electron -D
|
|
26
|
-
```
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```bash
|
|
26
|
+
# yarn
|
|
31
27
|
yarn add @tomjs/vite-plugin-electron -D
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
With `npm`
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
# npm
|
|
37
30
|
npm i @tomjs/vite-plugin-electron --save-dev
|
|
38
31
|
```
|
|
39
32
|
|
package/README.zh_CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> 一个简单的 [electron](https://www.electronjs.org/zh/) [vite](https://cn.vitejs.dev/) 插件,支持 `esm` 和 `cjs`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
非常感谢 [caoxiemeihao](https://github.com/caoxiemeihao) 的 [vite-plugin-electron](https://github.com/electron-vite/vite-plugin-electron) 和 [Doubleshotjs](https://github.com/Doubleshotjs) 的 [doubleshot](https://github.com/Doubleshotjs/doubleshot) 这两个优秀库给了我启发。我希望使用它能简化开发配置,只关注业务开发。
|
|
10
10
|
|
|
11
11
|
## 特性
|
|
12
12
|
|
|
@@ -15,25 +15,18 @@
|
|
|
15
15
|
- 支持 `main` 的 `热重启`
|
|
16
16
|
- 支持 `preload` 的 `热重载`
|
|
17
17
|
- 支持 `esm` 和 `cjs` ,你可以在 [electron v28+](https://www.electronjs.org/zh/blog/electron-28-0) 中使用 `esm`
|
|
18
|
-
- 支持 `vue` 和 `react`
|
|
18
|
+
- 支持 `vue` 和 `react` 等其他 `vite` 支持的[框架](https://cn.vitejs.dev/guide/#trying-vite-online)
|
|
19
19
|
|
|
20
20
|
## 安装
|
|
21
21
|
|
|
22
|
-
使用 `pnpm`
|
|
23
|
-
|
|
24
22
|
```bash
|
|
23
|
+
# pnpm
|
|
25
24
|
pnpm add @tomjs/vite-plugin-electron -D
|
|
26
|
-
```
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```bash
|
|
26
|
+
# yarn
|
|
31
27
|
yarn add @tomjs/vite-plugin-electron -D
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
使用 `npm`
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
# npm
|
|
37
30
|
npm i @tomjs/vite-plugin-electron --save-dev
|
|
38
31
|
```
|
|
39
32
|
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { Plugin } from 'vite';
|
|
|
2
2
|
import { Options } from 'tsup';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Electron main process options.
|
|
5
|
+
* Electron main process options. See [tsup](https://tsup.egoist.dev/) and [API Doc](https://paka.dev/npm/tsup) for more information.
|
|
6
6
|
* @see https://paka.dev/npm/tsup
|
|
7
7
|
* @see https://unpkg.com/browse/tsup/dist/index.d.ts
|
|
8
8
|
*/
|
|
@@ -26,7 +26,7 @@ interface MainOptions extends Omit<Options, 'entry' | 'format' | 'outDir' | 'wat
|
|
|
26
26
|
onSuccess?: () => Promise<void | undefined | (() => void | Promise<void>)>;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Electron preload process options.
|
|
29
|
+
* Electron preload process options. See [tsup](https://tsup.egoist.dev/) and [API Doc](https://paka.dev/npm/tsup) for more information.
|
|
30
30
|
* @see https://paka.dev/npm/tsup
|
|
31
31
|
* @see https://unpkg.com/browse/tsup/dist/index.d.ts
|
|
32
32
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Plugin } from 'vite';
|
|
|
2
2
|
import { Options } from 'tsup';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Electron main process options.
|
|
5
|
+
* Electron main process options. See [tsup](https://tsup.egoist.dev/) and [API Doc](https://paka.dev/npm/tsup) for more information.
|
|
6
6
|
* @see https://paka.dev/npm/tsup
|
|
7
7
|
* @see https://unpkg.com/browse/tsup/dist/index.d.ts
|
|
8
8
|
*/
|
|
@@ -26,7 +26,7 @@ interface MainOptions extends Omit<Options, 'entry' | 'format' | 'outDir' | 'wat
|
|
|
26
26
|
onSuccess?: () => Promise<void | undefined | (() => void | Promise<void>)>;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Electron preload process options.
|
|
29
|
+
* Electron preload process options. See [tsup](https://tsup.egoist.dev/) and [API Doc](https://paka.dev/npm/tsup) for more information.
|
|
30
30
|
* @see https://paka.dev/npm/tsup
|
|
31
31
|
* @see https://unpkg.com/browse/tsup/dist/index.d.ts
|
|
32
32
|
*/
|