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

Fix path in conditional import for ESM #71

Merged
merged 1 commit into from
Apr 29, 2021
Merged

Fix path in conditional import for ESM #71

merged 1 commit into from
Apr 29, 2021

Conversation

blasterpistol
Copy link
Contributor

There is no path like ./dist/use-sound.esm.mjs, only ./dist/use-sound.esm.js.
It fixes build error Module not found: Error: Can't resolve 'use-sound' in bundlers such as Webpack.

There is no path like "./dist/use-sound.esm.mjs", only "./dist/use-sound.esm.js".
It fixes build error "Module not found: Error: Can't resolve 'use-sound'" in bundlers such as Webpack.
@joshwcomeau
Copy link
Owner

Hm, I wonder if this is the type of thing that depends on the Node version or something 🤔 I remember seeing bits about .mjs for certain Node versions.

But yeah, when I build it locally, I get a .js, so I'll go with this for now

@joshwcomeau joshwcomeau merged commit 23b5bf0 into joshwcomeau:master Apr 29, 2021
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.

2 participants