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

Fixed missing package type #240

Closed
wants to merge 1 commit into from
Closed

Conversation

tkvw
Copy link

@tkvw tkvw commented Dec 21, 2021

See subject

@newbeea
Copy link

newbeea commented Dec 22, 2021

Need this pr in nuxt3

@benmccann
Copy link
Contributor

This is not a valid fix.

These lines are incorrect:

  "main": "./main.js",
  "module": "./index.js",

Only one of them can have a .js extension. If you have "type": "module" then .js will be treated as ESM and if you don't then it will be treated as CJS. If you make this change to add "type": "module", then you should also change the packaging to make the main named main.cjs instead of main.js or else you're likely to break CJS users

@benmccann benmccann mentioned this pull request Feb 4, 2022
@benjamn benjamn closed this in #254 Feb 4, 2022
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.

3 participants