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

Types not exported, causing issues with NodeNext #4

Closed
cevr opened this issue Sep 19, 2023 · 2 comments
Closed

Types not exported, causing issues with NodeNext #4

cevr opened this issue Sep 19, 2023 · 2 comments

Comments

@cevr
Copy link

cevr commented Sep 19, 2023

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch vite-plugin-legacy-swc@0.4.0 for the project I'm working on.

It seems like the "types" export is missing, causing issues with typescript when using moduleResolution: "NodeNext"

Here is the diff that solved my problem:

diff --git a/node_modules/vite-plugin-legacy-swc/package.json b/node_modules/vite-plugin-legacy-swc/package.json
index 62cbde3..f35c247 100644
--- a/node_modules/vite-plugin-legacy-swc/package.json
+++ b/node_modules/vite-plugin-legacy-swc/package.json
@@ -8,6 +8,7 @@
   "types": "./dist/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/index.d.ts",
       "import": "./dist/index.mjs",
       "require": "./dist/index.cjs"
     }

This issue body was partially generated by patch-package.

@CyanSalt
Copy link
Owner

You are right. Feedback is greatly appreciated and I will fix it.

@CyanSalt
Copy link
Owner

Fixed in v0.4.1.

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

No branches or pull requests

2 participants