-
Notifications
You must be signed in to change notification settings - Fork 37
/
build.cjs
executable file
·36 lines (35 loc) · 891 Bytes
/
build.cjs
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
#!/usr/bin/env node
require("esbuild")
.build({
bundle: true,
entryPoints: ["src/index.ts", "src/cli/index.ts"],
outdir: "dist",
external: [
"@proload/core",
"@proload/plugin-tsm",
"i18next-browser-languagedetector",
"i18next-fs-backend",
"i18next-http-backend",
"i18next",
"iso-639-1",
"locale-emoji",
],
minify: true,
format: "esm",
platform: "node",
target: "node14",
banner: {
js: `
import module2 from 'module';
import path2 from 'path';
import * as url2 from 'url';
const require = module2.createRequire(import.meta.url);
const __filename = url2.fileURLToPath(import.meta.url);
const __dirname = path2.dirname(__filename);
`,
},
sourcemap: false,
sourcesContent: false,
allowOverwrite: true,
})
.catch(() => process.exit(1));