mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
 | |
| const CopyPlugin = require('copy-webpack-plugin');
 | |
| const { join } = require('path');
 | |
| 
 | |
| const outputDir = join(__dirname, 'dist');
 | |
| 
 | |
| module.exports = {
 | |
|   output: {
 | |
|     path: outputDir,
 | |
|   },
 | |
|   plugins: [
 | |
|     new NxAppWebpackPlugin({
 | |
|       target: 'node',
 | |
|       compiler: 'tsc',
 | |
|       main: './src/electron-main.ts',
 | |
|       tsConfig: './tsconfig.app.json',
 | |
|       assets: ["./src/assets"],
 | |
|       optimization: false,
 | |
|       outputHashing: 'none',
 | |
|       generatePackageJson: true,
 | |
|       externalDependencies: [
 | |
|         "electron/main",
 | |
|         "electron",
 | |
|         "@electron/remote"
 | |
|       ],
 | |
|       assets: [
 | |
| 
 | |
|       ]
 | |
|     }),
 | |
|     new CopyPlugin({
 | |
|         patterns: [
 | |
|             {
 | |
|                 from: "node_modules/better-sqlite3/build/Release",
 | |
|                 to: join(outputDir, "Release")
 | |
|             },
 | |
|             {
 | |
|                 from: "../client/dist",
 | |
|                 to: join(outputDir, "public")
 | |
|             },
 | |
|             {
 | |
|                 from: "../server/dist/node_modules",
 | |
|                 to: join(outputDir, "node_modules")
 | |
|             },
 | |
|             {
 | |
|                 from: "../server/dist/assets",
 | |
|                 to: join(outputDir, "assets")
 | |
|             }
 | |
|         ]
 | |
|     })
 | |
|   ],
 | |
| };
 |