Separate the Cloudflare peer pin for plain Vite integration
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vite
- Lĩnh vực
- build-system, developer-experience
Hướng nghiên cứu
Read the package peer dependency metadata and compare it with the /vite and /cloudflare adapter entry points linked in the issue. Reproduce the strict peer installation failure with pnpm using the versions provided; then identify a compatibility policy that keeps the /cloudflare adapter's exact runtime check intact. Done means plain /vite consumers can install a supported combination without weakening that check.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
@tanstack/[email protected] declares the optional peer @cloudflare/vite-plugin: "1.65.0" at package level. This also applies to applications using only @tanstack/redact/vite alongside the official Cloudflare Vite plugin, without importing @tanstack/redact/cloudflare.
As a result, strict peer installation fails for that integration with @cloudflare/[email protected].
I checked the separate /cloudflare adapter: it vendors a maintained 1.65.0 integration and intentionally checks that exact version. I am not requesting that its runtime guard be removed or that all Cloudflare v2 versions be declared compatible.
The distinction is that the plain /vite adapter uses Vite hooks and does not import the Cloudflare plugin.
Steps to Reproduce
In an empty directory, use:
{
"private": true,
"dependencies": {
"@tanstack/redact": "0.3.1",
"@cloudflare/vite-plugin": "2.0.0-beta.v.11",
"vite": "8.3.6"
}
}
Run:
pnpm install --lockfile-only --strict-peer-dependencies --ignore-scripts
This fails before either adapter is imported.
The intended application setup uses these two independent imports:
import { redact } from '@tanstack/redact/vite'
import { cloudflare } from '@cloudflare/vite-plugin'
Expected Behavior
A compatibility policy for the plain /vite integration that is separate from the vendored /cloudflare adapter's exact peer requirement.
For example, a separately packaged adapter could retain its narrow peer range, or supported plain-Vite combinations could be documented/tested while retaining the exact runtime check on /cloudflare. I would welcome the maintainers' preferred approach rather than assuming a blanket peer-range expansion is safe.
Actual Behavior
Verified with pnpm 12.18.0:
[ERR_PNPM_PEER_DEP_ISSUES] Unmet peer dependencies
✕ unmet peer @cloudflare/vite-plugin
Installed: 2.0.0-beta.v.11
Wanted:
1.65.0:
@tanstack/[email protected]
An optional peer still produces this conflict when the application explicitly installs a different version.
Environment
@tanstack/redact: 0.3.1@cloudflare/vite-plugin: 2.0.0-beta.v.11- Plain Vite 8.3.6 for the isolated peer reproduction
- Node 26.13.0, pnpm 12.18.0, macOS 27.2 arm64
- Application integration: TanStack Start, native RSC, React/React DOM 19.3.1,
@vitejs/[email protected], Vite+ 1.5.0 (Vite 8.3.5)
Additional Context
In the application, we scoped a pnpm peer correction to the exact version tested:
overrides:
'@tanstack/[email protected]>@cloudflare/vite-plugin:peer': '1.65.0 || 2.0.0-beta.v.11'
There was also a separate dev SSR optimizer issue, so the metadata override alone is not sufficient evidence of compatibility. Redact excludes the aliased React peers from optimization; the RSC client's CommonJS vendor then retained require("react-dom") in Cloudflare's neutral SSR optimizer.
We resolved that locally with:
import { esmExternalRequirePlugin } from 'vite' // also exported by vite-plus
// within the Vite configuration:
environments: {
ssr: {
optimizeDeps: {
rolldownOptions: {
plugins: [
esmExternalRequirePlugin({ external: ['react', 'react-dom'] }),
],
},
},
},
},
This keeps the RSC environment on native React and leaves Redact's shared runtime aliases/exclusions in place. With both local changes, the application passed dev SSR/hydration, navigation and Devtools smoke checks, plus preview builds. That is evidence for this specific combination, not a general v2 support claim.
I reported the optimizer behavior separately at https://github.com/cloudflare/workers-sdk/issues/16769, with a framework-free reproduction. It also reproduces on the newer Cloudflare beta 2.0.0-beta.v.12 and plain Vite 8.3.6. An integration note linking the required optimizer handling would also help plain-Vite consumers while that is investigated.
- Ngôn ngữ chính
- TypeScript
- Star
- 581
- Fork
- 28
- Merge trung bình
- 13 giờ 48 phút
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/redact
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TanStack/redact#142 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`lazy(memo(Component))` doesn't re-render on store update when an ancestor reads the same storeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/redact
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel-labs/ui#809 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot:ai-assisted component:platform-js status:untriaged
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ranxianglei/billion-context#7068 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mybigday/whisper.rn#348 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
six-group/six-webcomponents#600 ·