Skip to content
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

fix: include types in package.json exports #321

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

joelmukuthu
Copy link
Contributor

This fixes this typescript error, when one tries to import windiCSS from 'vite-plugin-windicss';:

Could not find a declaration file for module 'vite-plugin-windicss'. 
  '/project/node_modules/vite-plugin-windicss/dist/index.mjs' implicitly has an 'any' type.
  There are types at '/project/node_modules/vite-plugin-windicss/dist/index.d.ts', but this 
  result could not be resolved when respecting package.json "exports". 
  The 'vite-plugin-windicss' library may need to update its package.json or typings.ts(7016)

This happens with vite-plugin-windicss v1.9.0, typescript v5.1.6 and the moduleResolution tsconfig compiler-option set to bundler, which per my understanding makes typescript import stuff only from what's defined in a module's exports.

@hannoeru hannoeru merged commit 64771a3 into windicss:main Aug 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants