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: change esm lib file format to mjs to fix incorrect node detection #61

Merged
merged 1 commit into from May 5, 2021

Conversation

klarkc
Copy link
Contributor

@klarkc klarkc commented Apr 29, 2021

According node docs:

If the nearest parent package.json lacks a "type" field, or contains "type": "commonjs", .js files are treated as CommonJS.

As vue-demi does not declare "type": "module", it must use .mjs extension on esm files.

This fix ERR_MODULE_NOT_FOUND when importing vue-demi in esm enviroment.

@antfu antfu merged commit a95a959 into vueuse:master May 5, 2021
@antfu
Copy link
Member

antfu commented May 5, 2021

Thanks!

antfu added a commit that referenced this pull request May 6, 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.

None yet

2 participants