mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-27 10:48:28 +01:00
027bd2f081
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
31 lines
937 B
TypeScript
31 lines
937 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
/**
|
|
* Common build script for extension scripts used in in webviews.
|
|
*/
|
|
|
|
import type esbuild from 'esbuild';
|
|
import { runBuild, type RunConfig } from './esbuild-common.mts';
|
|
|
|
const baseOptions: esbuild.BuildOptions = {
|
|
bundle: true,
|
|
minify: true,
|
|
sourcemap: false,
|
|
format: 'esm' as const,
|
|
platform: 'browser' as const,
|
|
target: ['es2024'],
|
|
logOverride: {
|
|
'import-is-undefined': 'error',
|
|
},
|
|
};
|
|
|
|
export async function run(
|
|
config: RunConfig,
|
|
args: string[],
|
|
didBuild?: (outDir: string) => unknown
|
|
): Promise<void> {
|
|
return runBuild(config, baseOptions, args, didBuild);
|
|
}
|