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

Add exports to package.json #286

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Add exports to package.json #286

merged 1 commit into from
Feb 17, 2024

Conversation

aethr
Copy link
Contributor

@aethr aethr commented Jan 23, 2024

This should allow consumers to import the ESM or UMD build depending on the project type.

Fixes #283

This allows consumers to import the ESM or UMD build depending on the project type.

Fixes #283
@ankurk91
Copy link
Owner

Looks like my other packages need this patch as well 😅

I am on vacation.
Will check it soon

@ankurk91 ankurk91 self-assigned this Jan 23, 2024
@aethr
Copy link
Contributor Author

aethr commented Jan 23, 2024

Nice, enjoy your vacation! 😄

@aethr
Copy link
Contributor Author

aethr commented Feb 14, 2024

Hi @ankurk91, wondering if you would have time to look at this soon? Hope you had a nice holiday. 🌴

@ankurk91
Copy link
Owner

Most likely this Saturday (my morning)

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (32d6a1b) 94.73% compared to head (6dc2dfd) 94.73%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files           4        4           
  Lines          95       95           
  Branches       24       24           
=======================================
  Hits           90       90           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ankurk91 ankurk91 merged commit 464ab93 into ankurk91:main Feb 17, 2024
3 checks passed
@Daissy538
Copy link

Hey,

We are using the vue-flatpickr-component. From version 11.0.4 we encountered an issue when running vue-tsc command.

 Could not find a declaration file for module 'vue-flatpickr-component'. '<*>/node_modules/vue-flatpickr-component/dist/esm/index.js' implicitly has an 'any' type.
  There are types at '<*>/node_modules/vue-flatpickr-component/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". 
The 'vue-flatpickr-component' library may need to update its package.json or typings.

The problem is fixed when downgrading to version 11.0.3.
We think it has something to do with the additional exports defined in the package.json. We are wondering if we are doing something wrong or if this is a general issue.

Thanks!

@ankurk91
Copy link
Owner

microsoft/TypeScript#51862 (comment)

Does this help?

@Daissy538
Copy link

Hey,

Thanks for reaching out. So our current setup for our Vue application:
module: "ESNext"
moduleResolution: "bundler"

https://www.typescriptlang.org/tsconfig#moduleResolution
As far as I could see in the documentation it seems that is should support Exports and Imports (like node16).

I can not share my code, but we can look more into module and module resolutions.

Thanks!

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.

FlatPickr component does not render correctly in vitest tests, may be because of UMD build
3 participants