-
Notifications
You must be signed in to change notification settings - Fork 45
fix for initOpenNextCloudflareForDev
#507
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
Conversation
|
commit: |
async function patchWranglerConfig() { | ||
//First thing here, we try to load the `wrangler.jsonc` file | ||
let existingWranglerConfig: Record<string, unknown> | null = null; | ||
const originalWranglerConfigPath = `${process.cwd()}/wrangler.jsonc`; |
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.
But:
- this does not support
toml
andjson
extensions - this does not support custom config paths
I think the best workaround for now would be to set script_name
to the worker name. It is not ideal either as wrangler
then shows a misleading warning :(
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 know it was more just a quick patch to test a fix for some cases and to get feedback (that's why it's a draft)
The big issue with the script_name
is that in preview if you use one of the DO, it fails.
I think the good quick fix is in the workers-sdk to have an option to ignore DO for getPlatformProxy
, we don't need more than that, just that it doesn't crash at build time.
I'm gonna close this then, hopefully we'll get a fix pretty soon for cloudflare/workers-sdk#8687 |
A quick fix for
initOpenNextCloudflareForDev
while waiting for a better solution in wrangler itself.Fix #502