-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathesbuild.mjs
More file actions
31 lines (28 loc) · 821 Bytes
/
esbuild.mjs
File metadata and controls
31 lines (28 loc) · 821 Bytes
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
/**
* @fileoverview Build script for bundling the extension using esbuild.
* @version 1.0.0
*/
/**
* Build the extension using esbuild.
* This script bundles src/extension.js into dist/extension.js
* and includes strip_logic_from_content.js.
*/
import { build } from 'esbuild';
import path from 'path';
(async function run_build() {
try {
await build({
entryPoints: [path.join('.', 'src', 'extension.mjs')],
bundle: true,
platform: 'node',
format: 'cjs',
target: 'node18',
outfile: path.join('.', 'dist', 'extension.js'),
external: ['vscode']
});
console.log('Build completed successfully.');
} catch (error) {
console.error('Build failed:', error);
process.exit(1);
}
})();