Skip to content

fix: resolve _app deps in API routes #1738

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

Merged
merged 3 commits into from
Nov 5, 2022
Merged

fix: resolve _app deps in API routes #1738

merged 3 commits into from
Nov 5, 2022

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Nov 4, 2022

Summary

next/server, in its wisdom, always loads _app and _document, even in API routes. This PR ensures that any dependencies of these files are included in the API routes bundle.

Test plan

  1. Visit the demo site that is using the published tagged version of this, and check the logs: https://app.netlify.com/sites/next-scheduled-test/functions/_api_scheduled-test-handler

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

image

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 4, 2022
@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/63654aee550d5e000862671f
😎 Deploy Preview https://deploy-preview-1738--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/63654aee150b1a00089b6369
😎 Deploy Preview https://deploy-preview-1738--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/63654aee43cc75000a80f4b9
😎 Deploy Preview https://deploy-preview-1738--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/63654aee3af2430008fd036f
😎 Deploy Preview https://deploy-preview-1738--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/63654aeebc5c35000935e270
😎 Deploy Preview https://deploy-preview-1738--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/63654aee08aa490008406014
😎 Deploy Preview https://deploy-preview-1738--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/63654aee3af2430008fd0374
😎 Deploy Preview https://deploy-preview-1738--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/63654aee08aa490008406019
😎 Deploy Preview https://deploy-preview-1738--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 4, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit b87f66f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/63654aee187d7b0009a10b4e
😎 Deploy Preview https://deploy-preview-1738--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ascorbic ascorbic marked this pull request as ready for review November 4, 2022 14:55
@ascorbic ascorbic requested a review from a team November 4, 2022 14:55
Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Looks good, and thanks for adding the tests! 😎 🚀

@kodiakhq kodiakhq bot merged commit df6fcda into main Nov 5, 2022
@kodiakhq kodiakhq bot deleted the mk/page-resolvers branch November 5, 2022 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants