Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.89k stars 424 forks source link

Typescript: Types not imported using "moduleResolution": "nodenext" #1003

Closed rubencosta closed 1 year ago

rubencosta commented 2 years ago

Checks

Version

v4.1.3

Description

types field is missing from package.json exports main (.) export and typescript does not fallback to the top-level types.

Reproduction Link

No response

Steps to Reproduce

  1. Install the package from npm
  2. Typescript can't find this package's type declarations

Expected Behaviour

  1. Install the package from npm
  2. Typescript can find this package's type declarations
NaotoshiFujita commented 1 year ago

Thank you for your PR. I've meged it. But after that, I noticed the comment in the document that you posted as reference:

// Entry-point for TypeScript resolution - must occur first! "types": "./types/index.d.ts",

So I moved it to the top and then published a new version 4.1.4. Thanks :)