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.
Change the docs TypeScript configuration from
moduleResolution: "node"tomoduleResolution: "bundler"so TypeScript resolves packageexportsmaps the same way the Docusaurus webpack build does.This should allow public package subpath imports such as
@temporalio-web/consent-banner/coreto use the package's shipped type declarations directly, without local compatibility shims.Scope:
tsconfig.jsonto usemoduleResolution: "bundler".types/temporalio-web-consent-banner.d.tsif TypeScript resolves@temporalio-web/consent-banner/coredirectly.npx tsc --noEmit -p tsconfig.json.yarn buildto confirm Docusaurus still builds with the updated resolver assumptions.exportshandling.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.