@tomjs/vite-plugin-electron 2.4.0 → 2.4.1

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.
Files changed (3) hide show
  1. package/README.md +10 -10
  2. package/README.zh_CN.md +10 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -206,16 +206,16 @@ export default defineConfig({
206
206
 
207
207
  ### PluginOptions
208
208
 
209
- | Property | Type | Default | Description |
210
- | ----------- | ---------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
211
- | recommended | `boolean` | `true` | This option is intended to provide recommended default parameters and behavior. |
212
- | external | `string[]` | | Don't bundle these modules, but dependencies and peerDependencies in your package.json are always excluded.[See more](https://tsdown.dev/reference/api/Interface.UserConfig#external) |
213
- | main | [MainOptions](#MainOptions) | | Configuration options for the electron main process. |
214
- | preload | [PreloadOptions](#PreloadOptions) | | Configuration options for the electron preload process. |
215
- | debug | `boolean` | `false` | Electron debug mode, don't startup electron. You can also use `process.env.VITE_ELECTRON_DEBUG`. Default is false. |
216
- | builder | `boolean` \| [BuilderOptions](#BuilderOptions) | `false` | If it is a `boolean` type, whether to enable [electron-builder](https://www.electron.build). If it is an object, it is the [configuration](https://www.electron.build/configuration/configuration) of [electron-builder](https://www.electron.build). You can also turn it on using `process.env.VITE_ELECTRON_DEBUG`. |
217
- | inspect | `boolean` | `false` | Electron will listen for V8 inspector protocol messages on the specified port, an external debugger will need to connect on this port. You can also use `process.env.VITE_ELECTRON_INSPECT`. See [debugging-main-process](https://www.electronjs.org/docs/latest/tutorial/debugging-main-process) for more information. |
218
- | devtools | `boolean` \| `number` | `true` | If `true`, depending on whether the `react` plugin exists, inject `<script src="http://localhost:8097"></script>` code for [react-devtools](https://github.com/facebook/react/tree/main/packages/react-devtools); depending on whether the `vue` plugin exists, inject `<script src="http://localhost:8097"></script>` for [vue-devtools](https://devtools.vuejs.org/guide/standalone) debugging; if `number`, the table represents a custom port. |
209
+ | Property | Type | Default | Description |
210
+ | ----------- | ---------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
211
+ | recommended | `boolean` | `true` | This option is intended to provide recommended default parameters and behavior. |
212
+ | external | `string[]` | | Don't bundle these modules, but dependencies and peerDependencies in your package.json are always excluded.[See more](https://tsdown.dev/reference/api/Interface.UserConfig#external) |
213
+ | main | [MainOptions](#MainOptions) | | Configuration options for the electron main process. |
214
+ | preload | [PreloadOptions](#PreloadOptions) | | Configuration options for the electron preload process. |
215
+ | debug | `boolean` | `false` | Electron debug mode, don't startup electron. You can also use `process.env.VITE_ELECTRON_DEBUG`. Default is false. |
216
+ | builder | `boolean` \| [BuilderOptions](#BuilderOptions) | `false` | If it is a `boolean` type, whether to enable [electron-builder](https://www.electron.build). If it is an object, it is the [configuration](https://www.electron.build/configuration/configuration) of [electron-builder](https://www.electron.build). You can also turn it on using `process.env.VITE_ELECTRON_DEBUG`. |
217
+ | inspect | `boolean` | `false` | Electron will listen for V8 inspector protocol messages on the specified port, an external debugger will need to connect on this port. You can also use `process.env.VITE_ELECTRON_INSPECT`. See [debugging-main-process](https://www.electronjs.org/docs/latest/tutorial/debugging-main-process) for more information. |
218
+ | devtools | `boolean` \| `number` | `true` | If `true`, depending on whether the `react` plugin exists, inject `<script src="http://localhost:8097"></script>` code for [react-devtools](https://github.com/facebook/react/tree/main/packages/react-devtools); depending on whether the `vue` plugin exists, inject `<script src="http://localhost:8097"></script>` for [vue-devtools](https://devtools.vuejs.org/guide/standalone) debugging; if `number`, it is a custom port. |
219
219
 
220
220
  **Notice**
221
221
 
package/README.zh_CN.md CHANGED
@@ -207,16 +207,16 @@ export default defineConfig({
207
207
 
208
208
  ### PluginOptions
209
209
 
210
- | 参数名 | 类型 | 默认值 | 说明 |
211
- | ----------- | --------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
212
- | recommended | `boolean` | `true` | 这个选项是为了提供推荐的默认参数和行为 |
213
- | external | `string[]` | | 不打包这些模块,但是 `dependencies` and `peerDependencies` 默认排除,[详见](https://tsdown.dev/zh-CN/reference/api/Interface.UserConfig) |
214
- | main | [MainOptions](#MainOptions) | | electron main 进程选项 |
215
- | preload | [PreloadOptions](#PreloadOptions) | | electron preload 进程选项 |
216
- | debug | `boolean` | `false` | Electron调试模式,不启动Electron。 您还可以使用 `process.env.VITE_ELECTRON_DEBUG` |
217
- | builder | `boolean` | `false` | 如果是`boolean`类型,是否启用[electron-builder](https://www.electron.build)。如果是`Object`,则是[electron-builder](https://www.electron.build)的[配置](https://www.electron.build/configuration/configuration)。 您还可以使用 `process.env.VITE_ELECTRON_DEBUG` 开启它。 |
218
- | inspect | `boolean` | `false` | Electron 将监听指定 port 上的 V8 调试协议消息, 外部调试器需要连接到此端口上。您还可以使用 `process.env.VITE_ELECTRON_INSPECT`。 有关更多信息,请参阅[debugging-main-process](https://www.electronjs.org/zh/docs/latest/tutorial/debugging-main-process)。 |
219
- | devtools | `boolean` \| `number` | `false` | 如果为 `true`,根据 `react` 插件是否存在,注入 `<script src="http://localhost:8097"></script>` 代码用于 [react-devtools](https://github.com/facebook/react/tree/main/packages/react-devtools); 根据 `vue` 插件是否存在,注入 `<script src="http://localhost:8097"></script>` 用于 [vue-devtools](https://devtools.vuejs.org/guide/standalone) 调试,如果为 `number`,则表为自定义端口。 |
210
+ | 参数名 | 类型 | 默认值 | 说明 |
211
+ | ----------- | --------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
212
+ | recommended | `boolean` | `true` | 这个选项是为了提供推荐的默认参数和行为 |
213
+ | external | `string[]` | | 不打包这些模块,但是 `dependencies` and `peerDependencies` 默认排除,[详见](https://tsdown.dev/zh-CN/reference/api/Interface.UserConfig) |
214
+ | main | [MainOptions](#MainOptions) | | electron main 进程选项 |
215
+ | preload | [PreloadOptions](#PreloadOptions) | | electron preload 进程选项 |
216
+ | debug | `boolean` | `false` | Electron调试模式,不启动Electron。 您还可以使用 `process.env.VITE_ELECTRON_DEBUG` |
217
+ | builder | `boolean` | `false` | 如果是`boolean`类型,是否启用[electron-builder](https://www.electron.build)。如果是`Object`,则是[electron-builder](https://www.electron.build)的[配置](https://www.electron.build/configuration/configuration)。 您还可以使用 `process.env.VITE_ELECTRON_DEBUG` 开启它。 |
218
+ | inspect | `boolean` | `false` | Electron 将监听指定 port 上的 V8 调试协议消息, 外部调试器需要连接到此端口上。您还可以使用 `process.env.VITE_ELECTRON_INSPECT`。 有关更多信息,请参阅[debugging-main-process](https://www.electronjs.org/zh/docs/latest/tutorial/debugging-main-process)。 |
219
+ | devtools | `boolean` \| `number` | `false` | 如果为 `true`,根据 `react` 插件是否存在,注入 `<script src="http://localhost:8097"></script>` 代码用于 [react-devtools](https://github.com/facebook/react/tree/main/packages/react-devtools); 根据 `vue` 插件是否存在,注入 `<script src="http://localhost:8097"></script>` 用于 [vue-devtools](https://devtools.vuejs.org/guide/standalone) 调试,如果为 `number`,则为自定义端口。 |
220
220
 
221
221
  `recommended` 选项用于设置默认配置和行为,几乎可以达到零配置使用,默认为 `true` 。如果你要自定义配置,请设置它为`false`。以下默认的前提条件是使用推荐的 [项目结构](#目录结构)。
222
222
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-electron",
3
3
  "type": "module",
4
- "version": "2.4.0",
4
+ "version": "2.4.1",
5
5
  "description": "A simple vite plugin for electron, supports esm/cjs, support esm in electron v28+",
6
6
  "author": {
7
7
  "name": "Tom Gao",