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

Type error fixes cause errors in next.js #65

Closed
jaywcjlove opened this issue Aug 7, 2023 · 2 comments
Closed

Type error fixes cause errors in next.js #65

jaywcjlove opened this issue Aug 7, 2023 · 2 comments

Comments

@jaywcjlove
Copy link
Contributor

jaywcjlove commented Aug 7, 2023

          @timlrx Type error fixes cause errors in next.js

Originally posted by @jaywcjlove in #64 (comment)

"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.

@jaywcjlove
Copy link
Contributor Author

.
├── all.d.ts
├── all.es.js
├── all.es.js.map
├── common.d.ts
├── common.es.js
├── common.es.js.map
├── generator.d.ts
├── generator.es.js
├── generator.es.js.map
├── index.d.ts
├── index.es.js
└── index.es.js.map

Modified the previous output type directory location

@timlrx
Copy link
Owner

timlrx commented Aug 7, 2023

Released as v1.6.3. Thanks for the fix!

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

No branches or pull requests

2 participants