-
Notifications
You must be signed in to change notification settings - Fork 44
/
.esbuild.config.js
51 lines (47 loc) · 1.37 KB
/
.esbuild.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
const esbuild = require('esbuild');
// Build node packages and their minifed versions
esbuild.build({
entryPoints: ['src/node/telemetryReporter.ts'],
tsconfig: "./src/node/tsconfig.json",
bundle: true,
external: ['vscode', './node_modules/*'],
sourcemap: true,
platform: 'node',
target: ['node14'],
outfile: 'lib/telemetryReporter.node.js',
}).catch(() => process.exit(1))
esbuild.build({
entryPoints: ['src/node/telemetryReporter.ts'],
tsconfig: "./src/node/tsconfig.json",
bundle: true,
sourcemap: false,
external: ['vscode', './node_modules/*'],
minify: true,
platform: 'node',
target: ['node14'],
outfile: 'lib/telemetryReporter.node.min.js',
}).catch(() => process.exit(1))
// Build browser packages and their minified versions
esbuild.build({
entryPoints: ['src/browser/telemetryReporter.ts'],
format: "esm",
tsconfig: "./src/browser/tsconfig.json",
bundle: true,
sourcemap: true,
external: ['vscode', './node_modules/*'],
platform: 'browser',
target: ['es6'],
outfile: 'lib/telemetryReporter.web.js',
}).catch(() => process.exit(1))
esbuild.build({
entryPoints: ['src/browser/telemetryReporter.ts'],
tsconfig: "./src/browser/tsconfig.json",
format: "esm",
bundle: true,
sourcemap: false,
external: ['vscode', './node_modules/*'],
minify: true,
platform: 'browser',
target: ['es6'],
outfile: 'lib/telemetryReporter.web.min.js',
}).catch(() => process.exit(1))