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

Reference types path to support moduleResolution: bundler #252

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Reference types path to support moduleResolution: bundler #252

merged 1 commit into from
Apr 6, 2023

Conversation

filiptammergard
Copy link
Contributor

When switching tsconfig moduleResolution to bundler, vite-plugin-sentry gives this error:

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

This is because the new bundler option respects package.json exports instead of implicitly inferring declaration file. So types field has to be added to support this.

Context on exports: https://nodejs.org/api/packages.html#community-conditions-definitions
Context on bundler: microsoft/TypeScript#51669

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (43e2900) 69.23% compared to head (9d48b8e) 69.23%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #252   +/-   ##
=======================================
  Coverage   69.23%   69.23%           
=======================================
  Files           4        4           
  Lines          52       52           
  Branches        8        8           
=======================================
  Hits           36       36           
  Misses         16       16           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ikenfin ikenfin merged commit 1b6ab82 into ikenfin:master Apr 6, 2023
@ikenfin
Copy link
Owner

ikenfin commented Apr 6, 2023

Thanks! Will update npm version asap

@filiptammergard
Copy link
Contributor Author

Thanks! Will update npm version asap

Thanks for quick response!

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.

3 participants