fix: add electron as an external for webpack (#239134)

* fix: add electron as an external for webpack

* refactor: move electron external to shared webpack
This commit is contained in:
Devraj Mehta 2025-02-03 13:54:18 -05:00 committed by GitHub
parent 3de8db436d
commit 63d1401dee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -13,5 +13,5 @@ module.exports = withDefaults({
context: __dirname,
entry: {
extension: './src/extension.ts',
}
},
});

View File

@ -56,6 +56,7 @@ function withNodeDefaults(/**@type WebpackConfig & { context: string }*/extConfi
}]
},
externals: {
'electron': 'commonjs electron', // ignored to avoid bundling from node_modules
'vscode': 'commonjs vscode', // ignored because it doesn't exist,
'applicationinsights-native-metrics': 'commonjs applicationinsights-native-metrics', // ignored because we don't ship native module
'@azure/functions-core': 'commonjs azure/functions-core', // optioinal dependency of appinsights that we don't use
@ -204,4 +205,3 @@ module.exports.node = withNodeDefaults;
module.exports.browser = withBrowserDefaults;
module.exports.nodePlugins = nodePlugins;
module.exports.browserPlugins = browserPlugins;