Skip to content

Evaluate TypeScript bundler module resolution for package exports #5265

Description

@davidcarlsonberg

Change the docs TypeScript configuration from moduleResolution: "node" to moduleResolution: "bundler" so TypeScript resolves package exports maps the same way the Docusaurus webpack build does.

This should allow public package subpath imports such as @temporalio-web/consent-banner/core to use the package's shipped type declarations directly, without local compatibility shims.

Scope:

  • Update tsconfig.json to use moduleResolution: "bundler".
  • Remove types/temporalio-web-consent-banner.d.ts if TypeScript resolves @temporalio-web/consent-banner/core directly.
  • Run npx tsc --noEmit -p tsconfig.json.
  • Run yarn build to confirm Docusaurus still builds with the updated resolver assumptions.
  • Fix any package import errors exposed by stricter package exports handling.

Notes:
A quick static scan found no obvious unexported package deep imports. Existing package subpath imports appear to be exported by their packages, including Docusaurus client/internal entrypoints, Algolia, Chart.js, React Icons, DocSearch, and the Temporal consent banner core entrypoint.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions