You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			744 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			744 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const path = require('path');
 | |
| const CopyPlugin = require('copy-webpack-plugin');
 | |
| 
 | |
| module.exports = {
 | |
| 	mode: 'production',
 | |
| 	entry: './src/index.ts',
 | |
| 	target: 'node',
 | |
| 	module: {
 | |
| 		rules: [
 | |
| 			{
 | |
| 				test: /\.tsx?$/,
 | |
| 				use: 'ts-loader',
 | |
| 				exclude: /node_modules/,
 | |
| 			},
 | |
| 		],
 | |
| 	},
 | |
| 	resolve: {
 | |
| 		alias: {
 | |
| 			api: path.resolve(__dirname, 'api'),
 | |
| 		},
 | |
| 		extensions: ['.tsx', '.ts', '.js'],
 | |
| 	},
 | |
| 	output: {
 | |
| 		filename: 'index.js',
 | |
| 		path: path.resolve(__dirname, 'dist'),
 | |
| 	},
 | |
| 	plugins: [
 | |
| 		new CopyPlugin({
 | |
| 			patterns: [
 | |
| 				{
 | |
| 					from: '**/*',
 | |
| 					context: path.resolve(__dirname, 'src'),
 | |
| 					to: path.resolve(__dirname, 'dist'),
 | |
| 					globOptions: {
 | |
| 						ignore: [
 | |
| 							'**/*.ts',
 | |
| 							'**/*.tsx',
 | |
| 						],
 | |
| 					},
 | |
| 				},
 | |
| 			],
 | |
| 		}),
 | |
| 	],
 | |
| };
 |