Switch most remaining extensions to use esbuild

Just 3 left:

- git and github. These are doing weird stuff with d.ts imports and const enums

- github-authentication  which has some tricky path mapping stuff
This commit is contained in:
Matt Bierner
2026-02-19 11:12:46 -08:00
parent e80ddbf450
commit 2d9e484c8e
24 changed files with 234 additions and 193 deletions

View File

@@ -1,7 +1,6 @@
src/**
build/**
cgmanifest.json
extension.webpack.config.js
extension-browser.webpack.config.js
esbuild*.mts
tsconfig*.json

View File

@@ -2,15 +2,17 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
import withDefaults from '../shared.webpack.config.mjs';
import * as path from 'node:path';
import { run } from '../esbuild-extension-common.mts';
export default withDefaults({
context: import.meta.dirname,
entry: {
extension: './src/extension.ts'
const srcDir = path.join(import.meta.dirname, 'src');
const outDir = path.join(import.meta.dirname, 'dist', 'browser');
run({
platform: 'browser',
entryPoints: {
'extension': path.join(srcDir, 'extension.ts'),
},
output: {
filename: 'extension.js'
}
});
srcDir,
outdir: outDir,
}, process.argv);

View File

@@ -2,15 +2,17 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
import { browser as withBrowserDefaults } from '../shared.webpack.config.mjs';
import * as path from 'node:path';
import { run } from '../esbuild-extension-common.mts';
export default withBrowserDefaults({
context: import.meta.dirname,
entry: {
extension: './src/extension.ts'
const srcDir = path.join(import.meta.dirname, 'src');
const outDir = path.join(import.meta.dirname, 'dist');
run({
platform: 'node',
entryPoints: {
'extension': path.join(srcDir, 'extension.ts'),
},
output: {
filename: 'extension.js'
}
});
srcDir,
outdir: outDir,
}, process.argv);

View File

@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {},
"exclude": [
"./src/test/**"
]
}