| 
									
										
										
										
											2025-04-29 12:50:05 +03:00
										 |  |  | const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin'); | 
					
						
							| 
									
										
										
										
											2025-04-30 14:45:42 +03:00
										 |  |  | const CopyPlugin = require('copy-webpack-plugin'); | 
					
						
							| 
									
										
										
										
											2025-04-29 12:50:05 +03:00
										 |  |  | const { join } = require('path'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-30 14:45:42 +03:00
										 |  |  | const outputDir = join(__dirname, 'dist'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-29 12:50:05 +03:00
										 |  |  | module.exports = { | 
					
						
							|  |  |  |   output: { | 
					
						
							|  |  |  |     path: join(__dirname, 'dist'), | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   plugins: [ | 
					
						
							|  |  |  |     new NxAppWebpackPlugin({ | 
					
						
							|  |  |  |       target: 'node', | 
					
						
							|  |  |  |       compiler: 'tsc', | 
					
						
							|  |  |  |       main: './src/electron-docs-main.ts', | 
					
						
							|  |  |  |       tsConfig: './tsconfig.app.json', | 
					
						
							|  |  |  |       optimization: false, | 
					
						
							|  |  |  |       outputHashing: 'none', | 
					
						
							|  |  |  |       generatePackageJson: true, | 
					
						
							| 
									
										
										
										
											2025-04-30 14:45:42 +03:00
										 |  |  |       externalDependencies: [ | 
					
						
							|  |  |  |         "better-sqlite3" | 
					
						
							|  |  |  |       ] | 
					
						
							|  |  |  |     }), | 
					
						
							|  |  |  |     new CopyPlugin({ | 
					
						
							|  |  |  |       patterns: [ | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |           from: "../desktop/dist/node_modules", | 
					
						
							|  |  |  |           to: join(outputDir, "node_modules") | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |       ] | 
					
						
							| 
									
										
										
										
											2025-04-29 12:50:05 +03:00
										 |  |  |     }) | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  | }; |