Files
Matt Bierner 39ebcc7f34 Use esbuild instead of webpack to bundle the css extension
Switches from webpack to esbuild to bundle the css extension. Tested this locally in a browser and creating an official build to test the bundled extension still work correctly
2026-02-13 00:05:47 -08:00

37 lines
1.3 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'node:path';
import { run } from '../esbuild-extension-common.mts';
const extensionRoot = import.meta.dirname;
await Promise.all([
// Build client
run({
platform: 'node',
entryPoints: {
'cssClientMain': path.join(extensionRoot, 'client', 'src', 'node', 'cssClientMain.ts'),
},
srcDir: path.join(extensionRoot, 'client', 'src'),
outdir: path.join(extensionRoot, 'client', 'dist', 'node'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'client', 'tsconfig.json'),
},
}, process.argv),
// Build server
run({
platform: 'node',
entryPoints: {
'cssServerMain': path.join(extensionRoot, 'server', 'src', 'node', 'cssServerNodeMain.ts'),
},
srcDir: path.join(extensionRoot, 'server', 'src'),
outdir: path.join(extensionRoot, 'server', 'dist', 'node'),
additionalOptions: {
tsconfig: path.join(extensionRoot, 'server', 'tsconfig.json'),
},
}, process.argv),
]);