@@ -186,10 +186,17 @@ export default defineConfig((ctx) => {
186
186
187
187
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
188
188
electron : {
189
- // extendElectronMainConf (esbuildConf) {},
190
- // extendElectronPreloadConf (esbuildConf) {},
189
+ // Configure main process build
190
+ extendElectronMainConf ( esbuildConf ) {
191
+ esbuildConf . external = esbuildConf . external || [ ]
192
+ esbuildConf . external . push ( '@maaxyz/maa-node' )
193
+ } ,
191
194
192
- // extendPackageJson (json) {},
195
+ // Configure preload script build
196
+ extendElectronPreloadConf ( esbuildConf ) {
197
+ esbuildConf . external = esbuildConf . external || [ ]
198
+ esbuildConf . external . push ( '@maaxyz/maa-node' )
199
+ } ,
193
200
194
201
// Electron preload scripts (if any) from /src-electron, WITHOUT file extension
195
202
preloadScripts : [ 'electron-preload' ] ,
@@ -212,6 +219,21 @@ export default defineConfig((ctx) => {
212
219
213
220
builder : {
214
221
appId : 'org.studio26f.maa-star-resonance' ,
222
+ files : [
223
+ "**/*" ,
224
+ "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}" ,
225
+ "!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}" ,
226
+ "!**/node_modules/*.d.ts" ,
227
+ "!**/node_modules/.bin" ,
228
+ "!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}" ,
229
+ "!.editorconfig" ,
230
+ "!**/._*" ,
231
+ "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}" ,
232
+ "!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}" ,
233
+ "!**/{appveyor.yml,.travis.yml,circle.yml}" ,
234
+ "!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}" ,
235
+ "!**/node_modules/@maaxyz/maa-node*/**/*"
236
+ ] ,
215
237
win : {
216
238
icon : 'assets/icons/icon.ico' ,
217
239
publish : [
@@ -227,6 +249,22 @@ export default defineConfig((ctx) => {
227
249
} ,
228
250
] ,
229
251
extraResources : [
252
+ {
253
+ from : 'node_modules/@maaxyz/maa-node/agent' ,
254
+ to : 'node_modules/@maaxyz/maa-node/agent' ,
255
+ } ,
256
+ {
257
+ from : 'node_modules/@maaxyz/maa-node/dist' ,
258
+ to : 'node_modules/@maaxyz/maa-node/dist' ,
259
+ } ,
260
+ {
261
+ from : 'node_modules/@maaxyz/maa-node/dist' ,
262
+ to : 'node_modules/@maaxyz/maa-node/dist' ,
263
+ } ,
264
+ {
265
+ from : 'node_modules/@maaxyz/maa-node-win32-x64' ,
266
+ to : 'node_modules/@maaxyz/maa-node-win32-x64' ,
267
+ } ,
230
268
{
231
269
from : 'src-electron/assets/maa-resources' ,
232
270
to : 'maa-resources' ,
0 commit comments