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(pkg): allow requiring package.json #6

Merged
merged 1 commit into from
Dec 16, 2020
Merged

fix(pkg): allow requiring package.json #6

merged 1 commit into from
Dec 16, 2020

Conversation

danielroe
Copy link
Member

@codecov-io
Copy link

Codecov Report

Merging #6 (9063130) into main (b38a06d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main       #6   +/-   ##
=======================================
  Coverage   84.23%   84.23%           
=======================================
  Files           7        7           
  Lines         184      184           
  Branches       49       49           
=======================================
  Hits          155      155           
  Misses         29       29           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b38a06d...9063130. Read the comment docs.

@@ -9,7 +9,8 @@
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"./": "./"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the most backward-compatible way to do this

Alternatively, if we want very specific control:

Suggested change
"./": "./"
"./package.json": "./package.json"

@pi0
Copy link
Member

pi0 commented Dec 16, 2020

Thanks!

@pi0 pi0 changed the title chore: allow requiring package.json fix(pkg): allow requiring package.json Dec 16, 2020
@pi0 pi0 merged commit 5fd5dc7 into unjs:main Dec 16, 2020
@danielroe danielroe deleted the fix-exports branch December 16, 2020 14:33
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.

FATAL Package subpath './package.json' is not defined by "exports" Error
3 participants