Fix ES module error - use CommonJS for main process
- Removed 'type: module' from package.json - Added postbuild script to create CommonJS package.json in dist/main - Fixed main entry path
This commit is contained in:
parent
4c3d3c6961
commit
0f84450205
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
Portable Mode Enabled
|
||||
Portable Mode
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,14 +2,14 @@
|
|||
"name": "ip-monitor",
|
||||
"version": "1.0.0",
|
||||
"description": "Modern IP Monitor Desktop Application",
|
||||
"main": "dist/main/main/index.js",
|
||||
"type": "module",
|
||||
"main": "dist/main/index.js",
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm run dev:vite\" \"npm run dev:electron\"",
|
||||
"dev:vite": "vite",
|
||||
"dev:electron": "wait-on tcp:5173 && cross-env NODE_ENV=development electron .",
|
||||
"build": "npm run build:main && npm run build:renderer",
|
||||
"build": "npm run build:main && npm run build:renderer && npm run postbuild",
|
||||
"build:main": "tsc -p tsconfig.main.json",
|
||||
"postbuild": "echo {\"type\":\"commonjs\"} > dist/main/package.json",
|
||||
"build:renderer": "vite build",
|
||||
"build:electron": "npm run build && electron-builder --win",
|
||||
"build:portable": "npm run build && electron-builder --win portable",
|
||||
|
|
|
|||
Loading…
Reference in New Issue