You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TS2307 on @kobalte/solidbase/default-theme/Layout: extensionless ./default-theme/* exports wildcard is unresolvable by TypeScript #157
For the specifier @kobalte/solidbase/default-theme/Layout, wildcard substitution yields the target ./dist/default-theme/Layout — a path with no extension. Bundlers apply extension guessing and find Layout.jsx, but Node's exports resolution (which TypeScript follows exactly) treats export-map targets as literal file paths and never appends extensions. So TS looks for a file literally named dist/default-theme/Layout, finds nothing, and reports TS2307 — even though dist/default-theme/Layout.d.ts sits right next to the runtime file.
(Related but distinct from #142, which is about the .js → .jsx specifiers inside the dist files; this one is about the export map itself.)
Suggested fix
The wildcard presumably stays extensionless so CSS subpaths (default-theme/index.css, Layout.module.css) keep working, so the least invasive fix is explicit entries for the JS-module subpaths users are expected to import when overriding theme components, alongside the existing wildcard (more specific patterns win):
(similarly for any other override points — mdx-components, context, etc.)
Alternatively, extension-full wildcards split by kind, e.g. a "./default-theme/*.css" passthrough plus "./default-theme/*" mapping to *.jsx/*.d.ts — whichever fits the file layout best.
Downstream workaround
Consumers can shim it locally with an ambient declaration, duplicating the signature from Layout.d.ts:
The wildcard then substitutes to a real file (./dist/default-theme/mdx-components.jsx), which both bundlers and Node exports resolution accept, and TypeScript picks up the adjacent .d.ts — no duplicated type signatures. Works for Layout the same way (default-theme/Layout.jsx).
Activity
daveycodez commentedon Jul 17, 2026
Simpler downstream workaround than the ambient shim: import with the explicit
.jsxextension —The wildcard then substitutes to a real file (
./dist/default-theme/mdx-components.jsx), which both bundlers and Node exports resolution accept, and TypeScript picks up the adjacent.d.ts— no duplicated type signatures. Works forLayoutthe same way (default-theme/Layout.jsx).