diff --git a/change/@microsoft-teams-js-355651b0-c6d4-47bb-b923-426b9a9a3bae.json b/change/@microsoft-teams-js-355651b0-c6d4-47bb-b923-426b9a9a3bae.json new file mode 100644 index 0000000000..327747cebe --- /dev/null +++ b/change/@microsoft-teams-js-355651b0-c6d4-47bb-b923-426b9a9a3bae.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Explicitly use browser implementation of `debug` package to resolve polyfill issue.", + "packageName": "@microsoft/teams-js", + "email": "109628470+noahdarveau-MSFT@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/teams-js/rollup.config.mjs b/packages/teams-js/rollup.config.mjs index f5e1845a3c..6999c3c8df 100644 --- a/packages/teams-js/rollup.config.mjs +++ b/packages/teams-js/rollup.config.mjs @@ -22,12 +22,6 @@ export default [ entryFileNames: '[name].js', sourcemap: false, plugins: [terser()], - globals: { - buffer: 'Buffer', - tty: 'tty', - util: 'util', - os: 'os', - }, }, preserveEntrySignatures: 'strict', plugins: [ diff --git a/packages/teams-js/src/internal/telemetry.ts b/packages/teams-js/src/internal/telemetry.ts index b2326ab2bd..d9c6797f91 100644 --- a/packages/teams-js/src/internal/telemetry.ts +++ b/packages/teams-js/src/internal/telemetry.ts @@ -1,4 +1,5 @@ -import { debug as registerLogger, Debugger } from 'debug'; +// We are directly referencing the browser implementation of `debug` to resolve an issue with polyfilling. For a full write-up on the bug please see ADO Bug #9619161 +import { debug as registerLogger, Debugger } from 'debug/src/browser'; import { UUID } from './uuidObject';