@@ -186,10 +186,17 @@ export default defineConfig((ctx) => {
186186
187187 // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
188188 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+ } ,
191194
192- // extendPackageJson (json) {},
195+ // Configure preload script build
196+ extendElectronPreloadConf ( esbuildConf ) {
197+ esbuildConf . external = esbuildConf . external || [ ]
198+ esbuildConf . external . push ( '@maaxyz/maa-node' )
199+ } ,
193200
194201 // Electron preload scripts (if any) from /src-electron, WITHOUT file extension
195202 preloadScripts : [ 'electron-preload' ] ,
@@ -212,6 +219,21 @@ export default defineConfig((ctx) => {
212219
213220 builder : {
214221 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+ ] ,
215237 win : {
216238 icon : 'assets/icons/icon.ico' ,
217239 publish : [
@@ -227,6 +249,22 @@ export default defineConfig((ctx) => {
227249 } ,
228250 ] ,
229251 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+ } ,
230268 {
231269 from : 'src-electron/assets/maa-resources' ,
232270 to : 'maa-resources' ,
0 commit comments