mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
+11
-1
@@ -64,6 +64,16 @@ function optimizeESMTask(opts) {
|
||||
});
|
||||
}
|
||||
};
|
||||
const overrideExternalPlugin = {
|
||||
name: 'override-external',
|
||||
setup(build) {
|
||||
// We inline selected modules that are we depend on on startup without
|
||||
// a conditional `await import(...)` by hooking into the resolution.
|
||||
build.onResolve({ filter: /^minimist$/ }, () => {
|
||||
return { path: path.join(REPO_ROOT_PATH, 'node_modules', 'minimist', 'index.js'), external: false };
|
||||
});
|
||||
},
|
||||
};
|
||||
const task = esbuild.build({
|
||||
bundle: true,
|
||||
external: entryPoint.exclude,
|
||||
@@ -71,7 +81,7 @@ function optimizeESMTask(opts) {
|
||||
platform: 'neutral', // makes esm
|
||||
format: 'esm',
|
||||
sourcemap: 'external',
|
||||
plugins: [boilerplateTrimmer],
|
||||
plugins: [boilerplateTrimmer, overrideExternalPlugin],
|
||||
target: ['es2022'],
|
||||
loader: {
|
||||
'.ttf': 'file',
|
||||
|
||||
Reference in New Issue
Block a user