-
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
getPlatformProxy does not build correctly when used #109
Comments
yutakobayashidev
changed the title
getPlatformProxy does not build correctly when used
Mar 2, 2024
getPlatformProxy
does not build correctly
I found a related workaround: |
That's not a bug. Please try this config while we are looking for a shorter way: import { defineConfig } from 'vite'
import { getPlatformProxy } from 'wrangler'
import honox from 'honox/vite'
import clientBuild from 'honox/vite/client'
import pagesBuild from '@hono/vite-cloudflare-pages'
export default defineConfig(async ({ mode, command }) => {
if (mode === 'client') {
return {
plugins: [clientBuild()]
}
}
if (command === 'build') {
return {
plugins: [honox(), pagesBuild()]
}
}
const { env, dispose } = await getPlatformProxy()
return {
plugins: [
honox({
devServer: {
env,
plugins: [
{
onServerClose: dispose
}
]
}
}),
pagesBuild()
]
}
}) |
justinnoel
added a commit
to justinnoel/hono-x-vite-test
that referenced
this issue
Mar 3, 2024
MIDO-ruby7
added a commit
to MIDO-ruby7/kanzen-ni-rikaishita
that referenced
this issue
Mar 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of HonoX are you using?
0.1.5
What steps can reproduce the bug?
When I load wrangler.toml using
getPlatformProxy
and try to build it, the client build does not finish. Sorry if I am using it incorrectly.deps:
What is the expected behavior?
Environment variables must be loaded correctly and build must be completed
What do you see instead?
When I load wrangler.toml using getPlatformProxy and try to build it, the client build does not finish.
The text was updated successfully, but these errors were encountered: