-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathesbuild.config.js
More file actions
33 lines (29 loc) · 1.11 KB
/
esbuild.config.js
File metadata and controls
33 lines (29 loc) · 1.11 KB
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
/*****************************************************************************
* @Author : Robert Huang<56649783@qq.com> *
* @CreatedDate : 2026-01-18 13:16:11 *
* @LastEditors : Robert Huang<56649783@qq.com> *
* @LastEditDate : 2026-01-18 13:16:47 *
* @FilePath : emoji-commit-tiny/esbuild.config.js *
* @CopyRight : MerBleueAviation *
****************************************************************************/
const esbuild = require('esbuild');
const options = {
entryPoints: ['./src/extension.js'],
bundle: true,
outfile: './dist/extension.js',
target: 'node14',
format: 'cjs',
platform: 'node',
sourcemap: false,
external: ['vscode']
};
if (process.argv.includes('--watch')) {
esbuild.context(options).then(context => context.watch());
} else {
esbuild.build(options)
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
}