-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
build.mjs
37 lines (34 loc) · 905 Bytes
/
build.mjs
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
import * as esbuild from 'esbuild'
await esbuild.build({
entryPoints: ['src/popup/popup.tsx'],
bundle: true,
sourcemap: true,
target: 'chrome88',
outfile: 'dist/popup/popup.js',
define: {
'process.env.VERSION': '"' + process.env.npm_package_version + '"',
'process.env.NODE_ENV': '"production"'
}
})
await esbuild.build({
entryPoints: ['src/service_worker/service_worker.ts'],
bundle: true,
sourcemap: true,
target: 'chrome88',
outfile: 'dist/service_worker/service_worker.js',
define: {
'process.env.VERSION': '"' + process.env.npm_package_version + '"',
'process.env.NODE_ENV': '"production"'
},
})
await esbuild.build({
entryPoints: ['src/popup/options.js'],
bundle: true,
sourcemap: true,
target: 'chrome88',
outfile: 'dist/popup/options.js',
define: {
'process.env.VERSION': '"' + process.env.npm_package_version + '"',
'process.env.NODE_ENV': '"production"'
}
})