vue-flatpickr-component icon indicating copy to clipboard operation
vue-flatpickr-component copied to clipboard

Add exports to package.json

Open aethr opened this issue 1 year ago • 2 comments

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

Fixes #283

aethr avatar Jan 23 '24 06:01 aethr

Looks like my other packages need this patch as well 😅

I am on vacation. Will check it soon

ankurk91 avatar Jan 23 '24 09:01 ankurk91

Nice, enjoy your vacation! :smile:

aethr avatar Jan 23 '24 10:01 aethr

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

aethr avatar Feb 14 '24 23:02 aethr

Most likely this Saturday (my morning)

ankurk91 avatar Feb 15 '24 05:02 ankurk91

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 15 '24 17:02 codecov[bot]

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!

Daissy538 avatar Feb 20 '24 09:02 Daissy538

https://github.com/microsoft/TypeScript/issues/51862#issuecomment-1358049778

Does this help?

ankurk91 avatar Feb 20 '24 10:02 ankurk91

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!

Daissy538 avatar Feb 20 '24 10:02 Daissy538