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 bundle type resolution #64

Merged
merged 2 commits into from
Aug 6, 2023
Merged

Fix bundle type resolution #64

merged 2 commits into from
Aug 6, 2023

Conversation

timlrx
Copy link
Owner

@timlrx timlrx commented Aug 6, 2023

@timlrx timlrx merged commit d8582ab into main Aug 6, 2023
@jaywcjlove
Copy link
Contributor

@timlrx Type error fixes cause errors in next.js

@jaywcjlove
Copy link
Contributor

"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/rehype-prism-plus.es.js"
},
"./common": {
"types": "./dist/src/common.d.ts",
"import": "./dist/common.es.js"
},
"./all": {
"types": "./dist/src/all.d.ts",
"import": "./dist/all.es.js"
},
"./generator": {
"types": "./dist/src/generator.d.ts",
"import": "./dist/generator.es.js"
}

The reason for the error is: import+require must be used in combination in the exports field in next.js.

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.

Can't build when moduleResolution set to bundler.
2 participants