From 963c961b59a405bf0c1a33d7c053acea30072c56 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Mon, 20 Jun 2022 19:06:16 -0400 Subject: [PATCH] Ensure 1DS can load on the web (#152678) * Ensure 1DS can load on the web * Add compiled file --- build/lib/util.js | 7 +++++++ build/lib/util.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/build/lib/util.js b/build/lib/util.js index 0f6cf5875fc..8fb15153970 100644 --- a/build/lib/util.js +++ b/build/lib/util.js @@ -336,6 +336,13 @@ function acquireWebNodePaths() { } nodePaths[key] = entryPoint; } + // @TODO lramos15 can we make this dynamic like the rest of the node paths + // Add these paths as well for 1DS SDK dependencies. + // Not sure why given the 1DS entrypoint then requires these modules + // they are not fetched from the right location and instead are fetched from out/ + nodePaths['@microsoft/dynamicproto-js'] = 'lib/dist/umd/dynamicproto-js.min.js'; + nodePaths['@microsoft/applicationinsights-shims'] = 'dist/umd/applicationinsights-shims.min.js'; + nodePaths['@microsoft/applicationinsights-core-js'] = 'browser/applicationinsights-core-js.min.js'; return nodePaths; } exports.acquireWebNodePaths = acquireWebNodePaths; diff --git a/build/lib/util.ts b/build/lib/util.ts index abbf9adc927..2992e8ba705 100644 --- a/build/lib/util.ts +++ b/build/lib/util.ts @@ -415,6 +415,13 @@ export function acquireWebNodePaths() { nodePaths[key] = entryPoint; } + // @TODO lramos15 can we make this dynamic like the rest of the node paths + // Add these paths as well for 1DS SDK dependencies. + // Not sure why given the 1DS entrypoint then requires these modules + // they are not fetched from the right location and instead are fetched from out/ + nodePaths['@microsoft/dynamicproto-js'] = 'lib/dist/umd/dynamicproto-js.min.js'; + nodePaths['@microsoft/applicationinsights-shims'] = 'dist/umd/applicationinsights-shims.min.js'; + nodePaths['@microsoft/applicationinsights-core-js'] = 'browser/applicationinsights-core-js.min.js'; return nodePaths; }