-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
refactor(deploy): cloudflare serve #879
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@@ -132,7 +138,7 @@ export function deployCloudflarePlugin(opts: { | |||
writeFileSync( | |||
workerEntrypoint, |
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.
I wonder if index.js and serve-cloudflare.js can be combined.
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.
It could be. We could remove this and update SERVE_JS to const SERVE_JS = 'index.js';
We need to look into error with dynamic pages:
|
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.
I found the fs issue exists in main. Possibly introduced in #876. So it is not this PR which looks good to me.
Thanks for confirming. |
I'm a bit confused at the moment. It seems to be the same issue that was fixed in #874. I will report back when I have a better reproduction at a specific commit. |
This (along with the previous #874) resolves the issue in #871. The build config was being written to the wrong location for cloudflare pages This PR exports a function from the build module that appends the build config to the given entries file location. It uses a new unstable build config state variable (`unstable_buildConfigSave`) to track whether or not the build config has be saved to the entries file. This allows the cloudflare deploy plugin to write the build config into the worker function directory instead of the root. We could merge #879 and then I can edit the base branch to main and continue with this PR. Or however you want to handle it. Thank you!
Prior art: