Skip to content

Commit 09d717d

Browse files
committed
compact with cjs and esm
1 parent 01d2957 commit 09d717d

File tree

5 files changed

+56
-73
lines changed

5 files changed

+56
-73
lines changed

nuxt.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export default defineNuxtConfig({
5050
build: {
5151
lib: {
5252
entry: "electron/main.ts",
53-
formats: ["es"],
53+
formats: ["cjs"],
5454
},
55+
outDir: "dist-electron",
5556
},
5657
},
5758
},
@@ -61,8 +62,9 @@ export default defineNuxtConfig({
6162
build: {
6263
lib: {
6364
entry: "electron/preload.ts",
64-
formats: ["es"],
65+
formats: ["cjs"],
6566
},
67+
outDir: "dist-electron",
6668
},
6769
},
6870
onstart(options) {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"private": true,
3-
"type": "module",
43
"packageManager": "[email protected]",
54
"main": "dist-electron/main.js",
65
"scripts": {
@@ -31,7 +30,6 @@
3130
"@vueuse/nuxt": "^10.5.0",
3231
"autoprefixer": "^10.4.16",
3332
"consola": "^3.2.3",
34-
"electron": "28.0.0-alpha.6",
3533
"electron-builder": "^24.6.4",
3634
"eslint": "^8.52.0",
3735
"eslint-plugin-nuxt": "^4.0.0",
@@ -58,6 +56,7 @@
5856
"@nuxtjs/tailwindcss": "^6.8.1",
5957
"@tailwindcss/forms": "^0.5.6",
6058
"@types/unist": "^3.0.1",
59+
"electron": "^27.0.2",
6160
"html-to-image": "^1.11.11",
6261
"pinia": "^2.1.7",
6362
"rehype-highlight": "^7.0.0",

0 commit comments

Comments
 (0)