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

importing in ESM project #33

Closed
aLemonFox opened this issue Sep 8, 2022 · 2 comments
Closed

importing in ESM project #33

aLemonFox opened this issue Sep 8, 2022 · 2 comments

Comments

@aLemonFox
Copy link

aLemonFox commented Sep 8, 2022

Hi, I am planning on converting some stuff to ESM since some other packages are moving to ESM only (no CommonJS imports). I saw that v0.4.0 is now also compiled as ESM.

However, I am getting Could not find a declaration file for module 'h5wasm'. Which is weird, since the package includes Typescript declarations right? Do I need to change something for ESM support?

@bmaranville
Copy link
Member

I'm not sure, but I know of another project that depends on h5wasm and uses typescript - see code in https://github.com/silx-kit/h5web/tree/main/packages/h5wasm/src for example.

@aLemonFox
Copy link
Author

Thanks, it's because I had configured "moduleResolution": "Node16" in tsconfig.json. Changing this to "Node" resolves the issue and still seems to work fine for ESM.

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