voidzero-dev / voidzero-dev/vite-plus
Warn on certain other tooling config files
- Ngôn ngữ chính
- Rust
- Star
- 5.8k
- Fork
- 262
- Merge trung bình
- 23 giờ 18 phút
- Pull request đã merge (30 ngày)
- 139
Mô tả
### Description
Currently Vite+ migrates the following first-party tool configurations automatically:
- Vite (`vite.config.ts`)
- Vitest (`vitest.config.ts`)
- tsdown (`tsdown.config.ts`)
- Oxlint (`.oxlintrc.json`)
- Oxfmt (`.oxfmtrc.json`)
As well as the following third-party tool configurations:
- ESLint (via `@oxlint/migrate`)
- Prettier (via `oxfmt --migrate` flow)
- tsup (via `tsdown-migrate`)
However, this still leaves certain tools unmigrated, which may have a Vite+-native replacement.
### Suggested solution
The following tools, if they and their config files are detected in the current project, will trigger a warning during `vp migrate`, pointing to each respective tool's instructions for migrating where possible:
- Jest / `vite-jest` -> Vitest
- `vite-jest` is 5 years old so it's probably going to be harder to migrate for most people.
- Rolldown -> Vite or tsdown
- Most users of Rolldown directly are likely looking for something like tsdown. The Vite mention is for if the user is a frontend library developer, in which case Vite(+)'s Library Mode probably makes more sense.
- Rollup -> Rolldown or tsdown
- I do not believe there is a direct Rollup -> tsdown migration guide, it probably makes sense to point to Rolldown's instead, but then it runs into the above condition of migrating off of direct Rolldown usage.
- Biome? -> oxlint/oxfmt
- This one is a bit of a stretch considering their current plugins API is different on a fundamental level, not to mention their parser being different, so I'm probably going to drop this in the final implementation.
### Alternative
Not letting the user know. This means the user might be using an entirely different set of tools which may behave differently, partially defeating the point of the unified toolchain vision of Vite+.
### Additional context
I'm thinking of working on this, it's been a thing on my mind for a couple of months now.
### Validations
- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- [x] Check that there isn't already an issue requesting the same feature.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ entry point `vp migrate` và kiểm tra cách phát hiện các tệp cấu hình hiện có của Vite+, Vitest, tsdown, Oxlint và Oxfmt. Xem lại hướng dẫn migration được liệt kê cho Jest, Rolldown, Rollup và có thể là Biome. Hoàn thành khi các cấu hình được phát hiện tạo ra các cảnh báo migration phù hợp và hướng người dùng đến các hướng dẫn liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- vite
- Lĩnh vực
- build-system, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100