-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: support local wrangler.toml #113
base: main
Are you sure you want to change the base?
feat: support local wrangler.toml #113
Conversation
Thank you for the PR and idea, your solution works well in development but we also need to think about production too. @pi0 and I discussed and he worked on generating the I think we should instead start by supporting reading the rootDir Then for production, in the This is currently only in the Nitro nightly build |
Happy to update your PR to read from the local |
I've just updated the PR to support that.
Is this for another PR? |
I would keep this PR as pending until we can also have the production wrangler generation, otherwise it will break for production once CF will detect a |
EDIT: Instead of using a config object, and to support production, the user wrangler configuration file will be read.
Hello 👋,
Actually, you use the module
nitro-cloudflare-dev
under the hood to access to the Wrangler environment API. To setup this module, you create awrangler.tom
file.However, if I want to access to another binding like AI or Email, it's not possible since I do not have any access to the
wrangler.toml
file.This PR allows to customize the wrangler file.
For example:
nuxt.config.ts
Will write the following
wrangler.toml
file:Then, I can access to the AI binding with the following code:
With a
console.log(globalThis)
we got:Without the custom config, the AI binding disapears:
related to #84