Skip to content

feat: expose browser build as a subpath export - #1953

Open
anshusaurav wants to merge 1 commit into
huggingface:mainfrom
anshusaurav:feat/browser-build-subpath-export
Open

anshusaurav wants to merge 1 commit into
huggingface:mainfrom
anshusaurav:feat/browser-build-subpath-export

Conversation

@anshusaurav

Copy link
Copy Markdown

Summary

  • expose @huggingface/transformers/dist/transformers.web.js through the package export map
  • preserve the existing conditional root entry points for Node ESM, Node CommonJS, and browser/default consumers
  • add package-resolution coverage for both CommonJS and ESM consumers

Closes #1945

Testing

  • tests/exports.test.js — 4 tests passed
  • bundle generation completed successfully for browser, web, Node ESM, and Node CommonJS outputs
  • targeted Prettier check passed for the changed files

The full package build reaches type generation, which currently stops at the pre-existing unused @ts-expect-error in src/models/vits/tokenization_vits.js:20. The full package formatting check also reports the pre-existing formatting difference in tests/utils/tensor_ops.test.js; neither file is changed by this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose the browser build as a subpath export (./dist/transformers.web.js)

1 participant