Skip to content

Commit 4ec597b

Browse files
authored
Merge pull request #196 from electron-vite/v0.28.0-beta.3
V0.28.0 beta.3
2 parents 700201b + 3d96c5f commit 4ec597b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.28.0-beta.3 (2024-01-05)
2+
3+
- d7c0a91 feat: preload built `format` adapt to `esm`
4+
15
## 0.28.0-beta.2 (2024-01-02)
26

37
- f557a98 feat: supports `"type": "module"`, better `esm` logic

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.28.0-beta.2",
3+
"version": "0.28.0-beta.3",
44
"description": "Electron 🔗 Vite",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/simple.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default async function electronSimple(options: ElectronSimpleOptions): Pr
5353
output: {
5454
// For use the Electron API - `import { contextBridge, ipcRenderer } from 'electron'`,
5555
// Note, however, that `preload.ts` should not be split. 🚧
56-
format: 'cjs',
56+
format: esmodule ? 'esm' : 'cjs',
5757

5858
// Whether Node.js is enabled in the Main process or not, the Preload scripts supports loading `electron` module,
5959
// so we need to build it in `cjs` format.

0 commit comments

Comments
 (0)