Repository navigation
Build botframework-directlinespeech-sdk with tsup only - #6045
Merged
Merged
Conversation
added 13 commits
November 9, 2026 18:58
One tsup config now emits the ES module, the CommonJS file and both browser scripts (window.DirectLineSpeech). main and the require condition point to tsup's CommonJS file instead of Babel's lib/; Babel (lib/) and webpack are no longer used to build.
tsup's globalName declares a top-level var, which is not global when the script runs inside a module wrapper; webpack assigned window.DirectLineSpeech.
…nespeech-tsup # Conflicts: # package-lock.json # packages/directlinespeech/package.json
Eugene (OEvgeny)
marked this pull request as ready for review
November 12, 2026 19:59
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
Thomas Durnford (tdurnford)
as code owners
November 12, 2026 19:59
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documented build sets node_env=test instead of NODE_ENV=test, leaving the browser bundle uninstrumented and invalidating the subsequent coverage verification step.
1 open issue
What changed in this PR
Consolidates the Direct Line Speech SDK build on tsup, following #6037, while preserving module formats, browser filenames, and the window.DirectLineSpeech API.
Changes:
- Replaces Babel and webpack build stages with tsup outputs for ES modules, CommonJS, and both browser scripts.
- Updates package entry points and published files, including the documented removal of
lib/. - Adds browser-export checks and updates build documentation.
| File | Description |
|---|---|
packages/directlinespeech/webpack.config.js |
Removes the webpack build configuration. |
packages/directlinespeech/tsup.config.ts |
Adds development and production browser bundles. |
packages/directlinespeech/src/bundle.js |
Exposes the SDK through window.DirectLineSpeech. |
packages/directlinespeech/src/__tests__/addMetaTag.iife.spec.js |
Checks browser exports and build metadata. |
packages/directlinespeech/package.json |
Simplifies builds and updates entry points, published files, and dependencies. |
package-lock.json |
Synchronizes build dependency changes. |
docs/BUILD_SCRIPTS.md |
Updates output descriptions and verification steps. |
.changelog/6045-feat-directlinespeech-tsup.md |
Records the build migration and breaking removal of lib/. |
Review effort: Balanced
William Wong (compulim)
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changelog Entry
Changed
botframework-directlinespeech-sdkwith tsup only, replacing Babel and webpack, in PR #6045, by @OEvgenyRemoved
botframework-directlinespeech-sdkno longer ships Babel'slib/folder: deep imports fromlib/stop working whereexportsis ignored (webpack 4), in PR #6045, by @OEvgenyDescription
One
tsup.config.tsbuilds the ES module, CommonJS and both browser scripts (same names and exports);lib/,stats.jsonand tests are no longer published.It was not tested against a real Direct Line Speech bot: we have no Speech resource with that channel. Instead, with real Speech credentials, old and new builds gave the same exports and connection attempts via
require()and in Chrome.Design
src/bundle.jssetswindow.DirectLineSpeechas webpack did; tsup'sglobalNameonly declares avar.Specific Changes
tsup.config.ts: 2 browser scripts fromsrc/bundle.jspackage.json:main/require→dist/*.js;files;@babel/runtime→ devDependenciesaddMetaTag.iife.spec.js: testswindow.DirectLineSpeechdocs/BUILD_SCRIPTS.md: updatedI have added tests and executed them locally
I have added
.changelog/<PR#>-<slug>.mdI have updated documentation
Review Checklist
z-index)package.jsonandpackage-lock.jsonreviewed