Rspack/Rsbuild: `@workflow/swc-plugin` can't run in `builtin:swc-loader`. Open to an `@workflow/rsbuild`?
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, typescript
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Start by running the documented npm install and npx rspack build reproduction, then read the @workflow/next/loader entry point. Review packages/builders/src/vercel-build-output-api.ts and the related Nitro and Astro builder files to understand the proposed integration boundaries. Done means an agreed Rsbuild integration or thin third-party path that supports the reported build and preserves existing .vercel/output/config.json content.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@workflow/swc-plugin fails in Rspack's builtin:swc-loader, so Rsbuild/Rspack apps have no supported way to use Workflow.
Repro
npm i -D @rspack/[email protected] @rspack/[email protected] @workflow/[email protected]
// src/index.ts
export async function add(a: number, b: number) {
'use step';
return a + b;
}
// rspack.config.mjs
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
export default {
target: 'node',
entry: './src/index.ts',
module: {
rules: [{
test: /\.ts$/,
loader: 'builtin:swc-loader',
options: { jsc: {
parser: { syntax: 'typescript' },
experimental: { plugins: [[require.resolve('@workflow/swc-plugin'), { mode: 'step' }]] },
} },
}],
},
};
Run npx rspack build.
Expected: the step transform runs.
Actual: failed to invoke plugin ... Failed to deserialize program received from host. The plugin pins swc_core 49 (Cargo.toml); Rspack 2.2 embeds swc_core 79.
Versions
@rspack/core 2.2.7; @workflow/swc-plugin 4.1.3 and 5.0.0-beta.7 (still swc_core 49 on main).
Workaround
@workflow/next/loader works as a plain Rspack JS loader.
Ask
Would you take an @workflow/rsbuild package? We have one working on workflow 4.8 (JS loader, BaseBuilder subclass, dev middleware) and can contribute it. If you'd rather keep it out of tree, two changes would keep a third-party plugin thin:
- Export the loader from a bundler-neutral path, e.g.
@workflow/builders/loader. - Have
VercelBuildOutputAPIBuildermerge into an existing.vercel/output/config.jsoninstead of overwriting it (vercel-build-output-api.ts#L111-L126). Nitro and Astro each re-merge it today (nitro, astro).
- Ngôn ngữ chính
- TypeScript
- Star
- 2.5k
- Fork
- 401
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 201
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
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 vercel/workflow
-
getPortLazy re-runs OS port discovery on every call when it finds no portCó 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 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violationCó thể đã có người làm @div-cowboy đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vercel/workflow#5057 · 1 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 74/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 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID formCó thể đã có người làm @Mohith26 đã nhận 113 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vercel/workflow
Issue tương tự
-
type: bug
Độ 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 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
db-ux-design-system/core-web#8856 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
'!' breaking change is lost when the commit also has an empty BREAKING CHANGE footerCó thể đã có người làm @wittdennis đã nhận hôm nay. Đang mởpriority: p3 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
googleapis/release-please#2971 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🛠️ dette technique
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
betagouv/mon-entreprise#4752 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày