-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.main.config.ts
More file actions
39 lines (37 loc) · 1003 Bytes
/
webpack.main.config.ts
File metadata and controls
39 lines (37 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import type { Configuration } from 'webpack';
import { rules } from './webpack.rules';
export const mainConfig: Configuration = {
// Add this for production builds
mode: process.env.BUILD_TYPE === 'prod' ? 'production' : 'development',
watchOptions: {
ignored: /node_modules|\.claude/,
},
stats: {
errorDetails: true,
},
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: './src/main.ts',
// Put your normal webpack config below here
module: {
rules,
},
externals: [
'@nestjs/microservices',
'@nestjs/websockets',
'@nestjs/websockets/socket-module',
'@nestjs/microservices/microservices-module',
],
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
fallback: {
path: false,
fs: false,
child_process: false,
},
},
// Node.js polyfills are no longer included by default in webpack 5
target: 'electron-main',
};