Skip to content

Commit 65c5524

Browse files
authored
Merge pull request #108 from electron-vite/v0.10.4
V0.10.4
2 parents 1cacfed + 8478bb4 commit 65c5524

File tree

6 files changed

+22
-11
lines changed

6 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.10.4 (2022-11-13)
2+
3+
- e4f943f refactor: move `build.resolve` to `resolve`
4+
- 91fb525 docs(zh-CN): update | @ggdream
5+
- 41db615 Use mode from source config. | #105, #106
6+
17
## 0.10.3 (2022-11-10)
28

39
- 0b24909 refactor: cleanup, provides some programmable APIs 🌱

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ export interface Configuration {
8181
startup: (argv?: string[]) => Promise<void>
8282
/** Reload Electron-Renderer */
8383
reload: () => void
84-
},
85-
) => void
84+
}) => void
8685
}
8786
```
8887

README.zh-CN.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
[English](https://github.com/electron-vite/vite-plugin-electron/tree/main#readme) | 简体中文
44

5+
- 感谢 @ggdream 老师提供 `vite-plugin-electron` 的 npm 包名 ❤️
6+
- 如果这个项目有帮到了你,作者很希望你能请客来一份下午茶 ٩(๑>◡<๑)۶
7+
58
## 需要留神
69

710
- 🚨 默认情况下, `electron` 文件夹下的文件将会被构建到 `dist-electron`
@@ -23,3 +26,7 @@
2326
},
2427
}),
2528
```
29+
30+
## 🍵 🍰 🍣 🍟
31+
32+
<img width="270" src="https://github.com/caoxiemeihao/blog/blob/main/assets/$qrcode/$.png?raw=true">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vite-plugin-electron",
3-
"version": "0.10.3",
3+
"version": "0.10.4",
44
"description": "Integrate Vite and Electron",
55
"main": "index.mjs",
66
"types": "types",

src/config.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export function resolveViteConfig(option: Configuration): InlineConfig {
2626
formats: ['cjs'],
2727
fileName: () => '[name].js',
2828
},
29-
resolve: {
30-
// Since we're building for electron (which uses nodDejs), we don't want to use the "browser" field in the packages.
31-
// It corrupts bundling packages like `ws` and `isomorphic-ws`, for example.
32-
browserField: false,
33-
mainFields: ['module', 'jsnext:main', 'jsnext'],
34-
},
3529
emptyOutDir: false,
3630
outDir: 'dist-electron',
3731
},
32+
resolve: {
33+
// #98
34+
// Since we're building for electron (which uses Node.js), we don't want to use the "browser" field in the packages.
35+
// It corrupts bundling packages like `ws` and `isomorphic-ws`, for example.
36+
mainFields: ['module', 'jsnext:main', 'jsnext'],
37+
},
3838
}
3939

4040
return mergeConfig(defaultConfig, option?.vite || {})

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export interface Configuration {
2727
startup: (argv?: string[]) => Promise<void>
2828
/** Reload Electron-Renderer */
2929
reload: () => void
30-
},
31-
) => void
30+
}) => void
3231
}
3332

3433
export default function electron(config: Configuration | Configuration[]): Plugin[] {

0 commit comments

Comments
 (0)