forked from homebridge/homebridge-config-ui-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
75 lines (73 loc) · 2.01 KB
/
webpack.config.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* eslint-disable @typescript-eslint/no-var-requires */
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: {
server: './src/main.ts',
},
output: {
filename: 'main.js',
path: path.join(__dirname, 'dist'),
libraryTarget: 'commonjs',
},
target: 'node',
mode: 'production',
externals: {
'axios': 'axios',
'fsevents': 'fsevents',
'node-pty-prebuilt-multiarch': 'node-pty-prebuilt-multiarch',
'@nestjs/common': '@nestjs/common',
'@nestjs/core': '@nestjs/core',
'@nestjs/platform-fastify': '@nestjs/platform-fastify',
'@nestjs/platform-socket.io': '@nestjs/platform-socket.io',
'@nestjs/websockets': '@nestjs/websockets',
'@nestjs/swagger': '@nestjs/swagger',
'@nestjs/jwt': '@nestjs/jwt',
'@nestjs/passport': '@nestjs/passport',
'@oznu/hap-client': '@oznu/hap-client',
'fastify-swagger': 'fastify-swagger',
'reflect-metadata': 'reflect-metadata',
'rxjs': 'rxjs',
'class-transformer': 'class-transformer',
'class-validator': 'class-validator',
'commander': 'commander',
'fastify': 'fastify',
'fastify-static': 'fastify-static',
'fastify-multipart': 'fastify-multipart',
'fs-extra': 'fs-extra',
'helmet': 'helmet',
'semver': 'semver',
'systeminformation': 'systeminformation',
'tcp-port-used': 'tcp-port-used',
'tar': 'tar',
'ora': 'ora',
'p-limit': 'p-limit'
},
node: {
global: false,
__filename: false,
__dirname: false,
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
module: {
rules: [
{
test: /.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
optimization: {
minimize: false,
},
plugins: [
new webpack.IgnorePlugin(/@nestjs\/microservices/),
new webpack.IgnorePlugin(/@nestjs\/platform-express/),
new webpack.IgnorePlugin(/swagger-ui-express/),
new webpack.IgnorePlugin(/cache-manager/),
new webpack.IgnorePlugin(/osx-temperature-sensor/)
],
};