-
Notifications
You must be signed in to change notification settings - Fork 43
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
docs(README) test: bindings and variables from wrangler.toml #83
base: main
Are you sure you want to change the base?
docs(README) test: bindings and variables from wrangler.toml #83
Conversation
Hi @KaiSpencer ! Thanks! First, you should separate the PR between fixing the README and adding tests. For testing. It might be better to do the testing on Because |
Hey @yusukebe, Happy to separate the PR! Yes I can understand how the tests would be better in the vite plugin, given honox I will reduce this PR to be just docs changes, and make a separate PR over in that repo for a e2e test that covers this functionality |
… from wrangler.toml" This partially reverts commit 66fb0d7.
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.
Maybe this should be in "Deployment", but you might note that Cloudflare Pages does not read wrangler.toml
in production, Remix does.
https://github.com/remix-run/remix/tree/main/templates/vite-cloudflare#deployment
return { | ||
plugins: [ | ||
honox({ | ||
devServer: { |
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.
Since this fix made the type correct, it would be easier to specify "env
and onServerClose
" as one plugin:
export default defineConfig(async () => {
const { env, dispose } = await getPlatformProxy()
return {
plugins: [
honox({
devServer: {
plugins: [
{
env,
onServerClose: dispose
}
]
}
})
]
}
})
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.
oo, nice. Will update to match :D
Hi @KaiSpencer Thanks! I've commented. |
Yeah, I considered if to put this into Deployment or to make Development, and changed my mind a few times along the way! I didnt notice that with remix, I gues it fits to both categories. Happy with with your direction on where you would like this |
Whilst writing this, I have come across this issue in the dev-server vite plugin. It does not change how this should be documented, we can carry on the testing discussion over there and just keep this to the docs change |
Adds some documentation to the readme on how pull from wrangler.toml when using
vite
dev serverAlso adds an e2e test ensuring the functionality works
Related: #76 #39