-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/pages router #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I think we just need to add to the exports
and also add pages-router
to the files
in the package.json to make sure its referenced correctly:
...
"files": [
"dist",
"app-router",
"pages-router"
],
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./app-router": {
"import": "./dist/app-router/handlers/enable-draftjs",
"require": "./dist/app-router/handlers/enable-draft.js",
"types": "./dist/app-router/handlers/enable-draft.d.ts"
},
"./pages-router": {
"import": "./dist/pages-router/handlers/enable-draft.js",
"require": "./dist/pages-router/handlers/enable-draft.js",
"types": "./dist/pages-router/handlers/enable-draft.d.ts"
}
},
...
ok tested this locally, just a few changes needed to get this working as expected, the new pattern for this import/export will look like this in a project: export { default as handler } from "@contentful/vercel-nextjs-toolkit/pages-router"; Pages router errors out if we dont have a default export handler from the api file. |
This looks good pending the few things we talked about shaping this back up last week 👍 |
Purpose
Description
TODO
Testing steps
Breaking Changes
Design, Documentation, and/or References
Deployment