@tomjs/vite-plugin-electron 1.7.1 → 1.8.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 CHANGED
@@ -416,3 +416,17 @@ Run `Debug Main Process` through `vscode` to debug the main thread. For debuggin
416
416
  ### Preload process Debug
417
417
 
418
418
  Use `DevTools` to debug the `preload process`.
419
+
420
+ ## Examples
421
+
422
+ First execute the following command to install dependencies and generate library files:
423
+
424
+ ```bash
425
+ pnpm install
426
+ pnpm build
427
+ ```
428
+
429
+ Open the [examples](./examples) directory, there are `vue` and `react` examples.
430
+
431
+ - [react](./examples/react)
432
+ - [vue](./examples/vue)
package/README.zh_CN.md CHANGED
@@ -415,3 +415,17 @@ app.whenReady().then(() => {
415
415
  ### Preload Process 调试
416
416
 
417
417
  使用 `DevTools` 调试 `preload process`.
418
+
419
+ ## 示例
420
+
421
+ 先执行以下命令安装依赖,并生成库文件:
422
+
423
+ ```bash
424
+ pnpm install
425
+ pnpm build
426
+ ```
427
+
428
+ 打开 [examples](./examples) 目录,有 `vue` 和 `react` 示例。
429
+
430
+ - [react](./examples/react)
431
+ - [vue](./examples/vue)
package/dist/index.js CHANGED
@@ -358,6 +358,7 @@ function preMergeOptions(options) {
358
358
  const electron2 = {
359
359
  target: ["es2021", "node16"],
360
360
  format,
361
+ shims: true,
361
362
  clean: true,
362
363
  dts: false,
363
364
  treeshake: !!isDev,
package/dist/index.mjs CHANGED
@@ -357,6 +357,7 @@ function preMergeOptions(options) {
357
357
  const electron2 = {
358
358
  target: ["es2021", "node16"],
359
359
  format,
360
+ shims: true,
360
361
  clean: true,
361
362
  dts: false,
362
363
  treeshake: !!isDev,
package/env.d.ts CHANGED
@@ -8,7 +8,7 @@ declare namespace NodeJS {
8
8
  /**
9
9
  * Node.js environment
10
10
  */
11
- NODE_ENV: UnionType<'development' | 'test' | 'production'>;
11
+ NODE_ENV: UnionType<'development' | 'production' | 'test'>;
12
12
  /**
13
13
  * The url of the dev server.
14
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-electron",
3
- "version": "1.7.1",
3
+ "version": "1.8.2",
4
4
  "description": "A simple vite plugin for electron, supports esm/cjs, support esm in electron v28+",
5
5
  "keywords": [
6
6
  "vite",