-
-
Notifications
You must be signed in to change notification settings - Fork 120
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: cloudflare pages adapter, alternate implementation #795
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,18 +59,12 @@ export function rscServePlugin(opts: { | |
opts.distPublic, | ||
), | ||
}; | ||
if (opts.serve === 'cloudflare' || opts.serve === 'partykit') { | ||
if (opts.serve === 'partykit') { | ||
viteConfig.build ||= {}; | ||
viteConfig.build.rollupOptions ||= {}; | ||
viteConfig.build.rollupOptions.external ||= []; | ||
if (Array.isArray(viteConfig.build.rollupOptions.external)) { | ||
viteConfig.build.rollupOptions.external.push('hono'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let us know if we need it and we can have a follow-up PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be fine without (didn't experience any build or dev issues without it) |
||
if (opts.serve === 'cloudflare') { | ||
viteConfig.build.rollupOptions.external.push( | ||
'hono/cloudflare-workers', | ||
'__STATIC_CONTENT_MANIFEST', | ||
); | ||
} | ||
} else { | ||
throw new Error( | ||
'Unsupported: build.rollupOptions.external is not an array', | ||
|
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.
@threepointone you might be interested in this PR, as you followed the previous cloudflare impl?