mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
dynamically refresh the view when the npm.exclude setting changes
This commit is contained in:
parent
49323b3798
commit
a323b399d6
|
@ -15,10 +15,16 @@ let taskProvider: vscode.Disposable | undefined;
|
|||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||
taskProvider = registerTaskProvider(context);
|
||||
registerExplorer(context);
|
||||
const treeDataProvider = registerExplorer(context);
|
||||
configureHttpRequest();
|
||||
vscode.workspace.onDidChangeConfiguration(() => {
|
||||
vscode.workspace.onDidChangeConfiguration((e) => {
|
||||
configureHttpRequest();
|
||||
if (e.affectsConfiguration('npm.exclude')) {
|
||||
invalidateScriptsCache();
|
||||
if (treeDataProvider) {
|
||||
treeDataProvider.refresh();
|
||||
}
|
||||
}
|
||||
});
|
||||
context.subscriptions.push(addJSONProviders(httpRequest.xhr));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue