Skip to content

Commit 9c07cd4

Browse files
committed
feat:electron index.js build
1 parent 3f38247 commit 9c07cd4

5 files changed

Lines changed: 812 additions & 45 deletions

File tree

chat2db-client/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/src/.umi-production
77
/src/.umi-test
88
/src/main/node_modules
9+
/src/main/dist
910
/dist
1011
.swc
1112
./yarn-error.log

chat2db-client/package.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/chat2db/Chat2DB"
88
},
99
"author": "fjy, hexi",
10-
"main": "src/main/index.js",
10+
"main": "src/main/dist/index.js",
1111
"scripts": {
1212
"build": "npm run build:web && npm run build:main",
1313
"build:desktop": "npm run build:web:desktop && npm run build:main:prod",
@@ -33,16 +33,13 @@
3333
"copy-to-clipboard": "^3.3.3",
3434
"echarts": "^5.4.2",
3535
"echarts-for-react": "^3.0.2",
36-
"electron-log": "^4.4.8",
37-
"electron-store": "^8.1.0",
3836
"event-source-polyfill": "^1.0.31",
3937
"highlight.js": "^11.9.0",
4038
"lodash": "^4.17.21",
4139
"markdown-it-link-attributes": "^4.0.1",
4240
"monaco-editor": "^0.44.0",
4341
"monaco-editor-esm-webpack-plugin": "^2.1.0",
4442
"monaco-editor-webpack-plugin": "^7.0.1",
45-
"node-machine-id": "^1.1.12",
4643
"react-monaco-editor": "^0.54.0",
4744
"react-sortablejs": "^6.1.4",
4845
"sql-formatter": "^13.0.4",
@@ -99,18 +96,11 @@
9996
"asar": false,
10097
"files": [
10198
"dist/**/*",
102-
"static/",
10399
"src/main",
104100
"versions/**/*",
105101
"package.json",
106102
"!node_modules/**/*"
107103
],
108-
"externals": [
109-
"electron-store",
110-
"uuid",
111-
"electron-log",
112-
"node-machine-id"
113-
],
114104
"nsis": {
115105
"oneClick": false,
116106
"perMachine": false,

chat2db-client/src/main/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
"electron-store": "^8.1.0",
1515
"node-machine-id": "^1.1.12",
1616
"uuid": "^9.0.1"
17+
},
18+
"devDependencies": {
19+
"webpack": "^5.89.0",
20+
"webpack-cli": "^5.1.4"
1721
}
1822
}

chat2db-client/src/main/webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const path = require('path');
33
module.exports = {
44
entry: './index.js',
55
output: {
6-
filename: 'main.js',
6+
filename: 'index.js',
77
path: path.resolve(__dirname, 'dist'),
88
},
9+
target: 'node'
910
};

0 commit comments

Comments
 (0)