-
Notifications
You must be signed in to change notification settings - Fork 38
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(dev-server): support c.env.ASSETS
for CF Pages
#23
Conversation
33e4c11
to
37b8f64
Compare
c.env.ASSETS
for CF Pagesc.env.ASSETS
for CF Pages
Hi @yudai-nkt! I was able to fix the |
that's cool thanks! i'm afraid i won't have time right now, but will check this on the weekend. |
I tried this fix with the reproduction repo in #17 (comment), but unfortunately I'm still getting the following error:
Vite config is as follows: import { type UserConfig } from "vite";
import pages from "@hono/vite-cloudflare-pages";
import { defaultOptions } from "@hono/vite-dev-server";
// copied from packages/dev-server/src/dev-server.ts in this PR
import { devServer } from "./plugin";
export default {
plugins: [
pages(),
devServer({
exclude: [...defaultOptions.exclude, /^\/assets\/.+/],
cf: { assets: true }
}),
],
} satisfies UserConfig; |
Uh, I was using |
Great!
Yes, we should use only Vite. |
Okay! I'll ship it now. |
Hi @yusukebe, it looks like you published this PR as |
Hi, @yudai-nkt . Ah! The tag name was wrong! But, the npm package name is correct: https://www.npmjs.com/package/@hono/vite-cloudflare-pages. So you can use the |
sorry, i meant |
Super sorry! I've published |
thanks, I'll try it tonight! |
Resolves #17