When an extension has a dependency to vscode/extension-telemetry and wants to webpack itself, it struggles with vscode/extension-telemetry as not all dependences can be resolved
for @vscode/extension-telemetry@0.7.5 the following is necessary:
externals: {
'applicationinsights-native-metrics': 'commonjs applicationinsights-native-metrics', // ignored because we don't ship native module
'@opentelemetry/tracing': 'commonjs @opentelemetry/tracing', // ignored because we don't ship this module
'@opentelemetry/instrumentation': 'commonjs @opentelemetry/instrumentation', // ignored because we don't ship this module
'@azure/opentelemetry-instrumentation-azure-sdk': 'commonjs @azure/opentelemetry-instrumentation-azure-sdk', // ignored because we don't ship this module
},
for @vscode/extension-telemetry@0.7.7 this is not enough:
WARNING in ./node_modules/applicationinsights/out/AutoCollection/AzureFunctionsHook.js 51:40-72
Module not found: Error: Can't resolve '@azure/functions-core' in '/home/martin/workspaces/vscode-remote-wsl/node_modules/applicationinsights/out/AutoCollection'
It would be better if vscode/extension-telemetry uses a packager itself (webpack or esbuild)
- it can be easily consumed without the knowledge above.
- all it's
dependencies go away (become devDependencies). Which reduces the number of node modules that need to be installed when depending on vscode/extension-telemetry.
- This allows
vscode/extension-telemetry to further reduce its size by defining stubs for even more functionality that isn't used.
When an extension has a dependency to
vscode/extension-telemetryand wants to webpack itself, it struggles with vscode/extension-telemetry as not all dependences can be resolvedfor
@vscode/extension-telemetry@0.7.5the following is necessary:for
@vscode/extension-telemetry@0.7.7this is not enough:It would be better if
vscode/extension-telemetryuses a packager itself (webpack or esbuild)dependenciesgo away (become devDependencies). Which reduces the number of node modules that need to be installed when depending onvscode/extension-telemetry.vscode/extension-telemetryto further reduce its size by defining stubs for even more functionality that isn't used.