forked from homebridge/homebridge-config-ui-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
73 lines (72 loc) · 1.89 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
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",
"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"
},
node: {
console: false,
global: false,
process: false,
Buffer: false,
__filename: false,
__dirname: false,
setImmediate: 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/)
],
};