Closed stellarhoof closed 1 month ago
@stellarhoof
Please use "moduleResolution": "bundler"
This setting is tailored for use with bundlers like Vite, Webpack, and similar tools.
Thanks for the prompt reply @cschroeter
A library should make no assumption on the technology used by consumers. For example I have a dedicated package just for styling ark components which publishes the emitted typescript files and have no need for bundling.
Also, the bug is present even if a bundler is used because this is about TypeScript not being able to resolve the imports.
The fix is to publish files with fully resolved imports. Ex:
// Assume the following structure: "bar/baz/index.js"
// Not fully resolved import
import { foo } from "./bar/baz"
// Fully resolved import
import { foo } from "./bar/baz/index.js"
Thanks for the detailed explanation. Feel free to file a PR if you have a concrete solution in mind
Description
Setting
tsconfig.json
'smoduleResulution
tonodenext
causes various imports to not resolve.Link to Reproduction (or Detailed Explanation)
https://codesandbox.io/p/devbox/twilight-grass-lygf9y
Steps to Reproduce
src/App.tsx
PolymorphicProps
cannot be resolved.Ark UI Version
4.1.0
Framework
Browser
Brave
Additional Information
No response