| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  | const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin'); | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  | const CopyPlugin = require('copy-webpack-plugin'); | 
					
						
							| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  | const { join } = require('path'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  | const outputDir = join(__dirname, 'dist'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  | module.exports = { | 
					
						
							|  |  |  |   output: { | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  |     path: outputDir, | 
					
						
							| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  |   }, | 
					
						
							|  |  |  |   plugins: [ | 
					
						
							|  |  |  |     new NxAppWebpackPlugin({ | 
					
						
							|  |  |  |       target: 'node', | 
					
						
							|  |  |  |       compiler: 'tsc', | 
					
						
							| 
									
										
										
										
											2025-04-23 13:22:13 +03:00
										 |  |  |       main: './src/electron-main.ts', | 
					
						
							| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  |       tsConfig: './tsconfig.app.json', | 
					
						
							|  |  |  |       assets: ["./src/assets"], | 
					
						
							|  |  |  |       optimization: false, | 
					
						
							|  |  |  |       outputHashing: 'none', | 
					
						
							|  |  |  |       generatePackageJson: true, | 
					
						
							| 
									
										
										
										
											2025-04-23 13:29:27 +03:00
										 |  |  |       externalDependencies: [ | 
					
						
							| 
									
										
										
										
											2025-04-23 19:59:16 +03:00
										 |  |  |         "electron/main", | 
					
						
							|  |  |  |         "electron", | 
					
						
							|  |  |  |         "@electron/remote" | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  |       ], | 
					
						
							|  |  |  |       assets: [ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-23 13:29:27 +03:00
										 |  |  |       ] | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  |     }), | 
					
						
							|  |  |  |     new CopyPlugin({ | 
					
						
							|  |  |  |         patterns: [ | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2025-04-23 18:38:47 +03:00
										 |  |  |                 from: "node_modules/better-sqlite3/build/Release", | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  |                 to: join(outputDir, "Release") | 
					
						
							| 
									
										
										
										
											2025-04-24 15:04:39 +03:00
										 |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 from: "../client/dist", | 
					
						
							|  |  |  |                 to: join(outputDir, "public") | 
					
						
							| 
									
										
										
										
											2025-04-24 15:39:34 +03:00
										 |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 from: "../server/dist/node_modules", | 
					
						
							|  |  |  |                 to: join(outputDir, "node_modules") | 
					
						
							|  |  |  |             }, | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 from: "../server/dist/assets", | 
					
						
							|  |  |  |                 to: join(outputDir, "assets") | 
					
						
							| 
									
										
										
										
											2025-04-23 14:31:11 +03:00
										 |  |  |             } | 
					
						
							|  |  |  |         ] | 
					
						
							| 
									
										
										
										
											2025-04-23 13:10:13 +03:00
										 |  |  |     }) | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  | }; |