Skip to content

fix: handle custom publish dir for api routes #1697

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 4 commits into from
Oct 19, 2022
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Oct 19, 2022

Summary

Fixes an issue where sites with custom publish directories were generating the incorrect import for required-server-files.json

Test plan

Almost all of this PR is rearranging the monorepo demos so that they can be used to test this. The only actual code change is this one file

  1. Visit an API route in a monorepo demo and ensure it loads

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

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.

@ascorbic ascorbic requested a review from a team October 19, 2022 11:21
@netlify
Copy link

netlify bot commented Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/634fe8a18e57a10008d2a7ee
😎 Deploy Preview https://deploy-preview-1697--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.

@netlify
Copy link

netlify bot commented Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/634fe8a1d804ec000a1d2e07
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/634fe8a1336f8f0008fefb51
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/634fe8a28e57a10008d2a7f3
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

Deploy Preview for next-plugin-rsc-demo ready!

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/634fe8a2768a2e00083d46a0
😎 Deploy Preview https://deploy-preview-1697--next-plugin-rsc-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.

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

netlify bot commented Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/634fe8a240689b00080cc16a
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/634fe8a2d804ec000a1d2e12
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/634fe8a24980cf00086f88d4
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/634fe8a28e57a10008d2a7f8
😎 Deploy Preview https://deploy-preview-1697--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 Oct 19, 2022

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

Name Link
🔨 Latest commit 53ac10c
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/634fe8a2768a2e00083d46a5
😎 Deploy Preview https://deploy-preview-1697--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.

@ascorbic ascorbic force-pushed the mk/api-route-monorepo-fix branch from 63c8b98 to ed4fa9c Compare October 19, 2022 11:45
Copy link
Contributor

@orinokai orinokai left a comment

Choose a reason for hiding this comment

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

Tested and can see API routes running with a custom publish dir ✅

@kodiakhq kodiakhq bot merged commit c24a520 into main Oct 19, 2022
@kodiakhq kodiakhq bot deleted the mk/api-route-monorepo-fix branch October 19, 2022 13:25
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