-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathesbuild.mjs
More file actions
29 lines (25 loc) · 1.29 KB
/
esbuild.mjs
File metadata and controls
29 lines (25 loc) · 1.29 KB
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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { autoEsbuildOrWatch, autoSelectEsbuildConfig } from '@microsoft/vscode-azext-eng/esbuild';
import { copy } from 'esbuild-plugin-copy';
const configs = autoSelectEsbuildConfig();
// The default esbuild config only copies root-level SVGs from vscode-azext-azureutils/resources/*.svg.
// We additionally copy the azureIcons subdirectory so that getAzureIconPath() (used by
// RoleDefinitionsTreeItem and other tree items from vscode-azext-azureutils) can resolve icons at runtime.
configs.extensionConfig = {
...configs.extensionConfig,
plugins: [
...(configs.extensionConfig.plugins ?? []),
copy({
assets: [
{
from: './node_modules/@microsoft/vscode-azext-azureutils/resources/azureIcons/*.svg',
to: './node_modules/@microsoft/vscode-azext-azureutils/resources/azureIcons',
},
],
}),
],
};
await autoEsbuildOrWatch(configs);