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

Package.json breaks typescript with "moduleResolution": "bundler" #3720

Closed
egorksv opened this issue May 28, 2024 · 1 comment · Fixed by #3763
Closed

Package.json breaks typescript with "moduleResolution": "bundler" #3720

egorksv opened this issue May 28, 2024 · 1 comment · Fixed by #3763

Comments

@egorksv
Copy link

egorksv commented May 28, 2024

Hi,

I'm using patch-package to fix this - missing these 3 lines breaks project set up with node20 / nextjs / react / react-wavesurfer

diff --git a/node_modules/wavesurfer.js/package.json b/node_modules/wavesurfer.js/package.json
index 826f1b4..000c57a 100644
--- a/node_modules/wavesurfer.js/package.json
+++ b/node_modules/wavesurfer.js/package.json
@@ -43,7 +43,9 @@
       "require": "./dist/plugins/*.cjs"
     },
     "./dist/*": {
-      "import": "./dist/*"
+      "import": "./dist/*",
+      "types": "./dist/*.d.ts",
+      "require": "./dist/*.cjs"
     },
     "./dist/plugins/*.esm.js": {
       "import": "./dist/plugins/*.esm.js",
@katspaugh
Copy link
Owner

Thanks for the report, feel free to make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants