-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
45 lines (40 loc) · 804 Bytes
/
build.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
import { build } from 'esbuild';
build({
entryPoints: ['./src/scopie.js'],
bundle: true,
minify: true,
platform: 'node',
outfile: 'dist/scopie.node.min.cjs',
sourcemap: false,
target: 'es2020',
})
build({
entryPoints: ['./src/scopie.js'],
bundle: true,
minify: false,
platform: 'node',
outfile: 'dist/scopie.node.js',
target: 'es2020',
})
build({
entryPoints: ['./src/scopie.js'],
bundle: true,
minify: true,
platform: 'node',
outfile: 'dist/scopie.node.min.js',
target: 'es2020',
})
build({
entryPoints: ['./src/scopie.js'],
bundle: false,
minify: false,
outfile: 'dist/scopie.browser.js',
sourcemap: true,
})
build({
entryPoints: ['./src/scopie.js'],
bundle: false,
minify: true,
outfile: 'dist/scopie.browser.min.js',
sourcemap: true,
})