-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moduleResolution: "bundler" support #68
Comments
LGTM, do you mind submitting a PR? |
fix of issue jacobmischka#68 : moduleResolution: "bundler" support
Thank you! Should be released in |
After PR, I reviewed official svelte site about packaging (https://kit.svelte.dev/docs/packaging#typescript), and found that they recommend add "typesVersions" field to package.json entries like :
As I use typescript version 5.0.0, it was fine without "typesVersions" field. For anyone using lower version of typescript, "typesVersions" field might necessary. I hope it helps for later updates. |
I tried use svelte-flatpickr with tsconfig.json setting as below:
When I import module as
import Flatpickr from 'svelte-flatpickr';
and executed
npm run check
, I see error :It was because
"moduleResolution": "Bundler"
option in tsconfig.json makes fail to find type definitions. (https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution)I tried to fix
package.json
file of svelte-flatpickr module as below, and error resolved.How about adding "types" field to svelte-flatpickr module's
package.json
file?The text was updated successfully, but these errors were encountered: