将 ReScript 与 rescript-react 集成到官方 Vite React 模板
vitejs-template-react-rescript — Vite 启动器模板
作者 jihchi
把 ReScript 与 rescript-react 接入官方 Vite React 模板的启动器,附带 Vitest 与 Tailwind CSS 配置。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
通过 @jihchi/vite-plugin-rescript 把 ReScript 编译接入 Vite
内置 Vitest 单元测试,并提供 rescript-vitest 绑定
测试 UI 组件使用 React Testing Library
样式采用 Tailwind CSS
MIT 许可,可免费使用、修改、商用和分发
模板详细介绍
这是一个基于 Vite 的 React 启动模板,核心工作是把 ReScript 和 rescript-react 集成进官方的 Vite React 模板。项目通过 @jihchi/vite-plugin-rescript 将 ReScript 编译接入 Vite 流程,因此可以在同一工程里用 ReScript 编写 React 组件。
模板同时包含测试与样式方面的配置:使用 Vitest 作为单元测试框架,配合 rescript-vitest 绑定和 React Testing Library 测试 UI 组件;样式采用 Tailwind CSS。README 给出的起步方式是使用 npx degit 拉取仓库、安装依赖后运行 npm start。
仓库采用 MIT 许可,可免费使用、修改、商用和分发该版本代码,分发时需保留版权声明与许可声明。演示图片、字体、图标等第三方素材的许可需单独核对;域名、托管等外部服务可能另行收费。README 中列出的替代方案为 rescript-lang/create-react-app(指向 create-rescript-app)。
适合你的项目吗?
适用场景
- 想用 ReScript 编写 React 组件并保留 Vite 开发流程的新项目
- 需要在 ReScript 项目中配置 Vitest 与 React Testing Library 的工程
- 希望以 Tailwind CSS 作为样式方案的 React 起步项目
- 想参考 ReScript 与 Vite 集成方式(vite-plugin-rescript)的开发者
适合人群
- 熟悉或愿意学习 ReScript 的前端开发者
- 使用 Vite 与 React 技术栈的团队
- 需要单元测试与组件测试基础配置的项目
- 偏好 Tailwind CSS 工具类写法的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用 npx degit jihchi/vitejs-template-react-rescript my-vitejs-react-rescript 拉取模板
- 2
进入目录后执行 npm install 安装依赖
- 3
运行 npm start 启动开发环境
- 4
ReScript 编译由 @jihchi/vite-plugin-rescript 接入 Vite,无需单独配置编译流程
- 5
第三方素材与外部服务需按各自许可或计费规则单独确认
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/jihchi/vitejs-template-react-rescript/blob/main/LICENSE.mdhttps://github.com/jihchi/vitejs-template-react-rescript/blob/main/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 90 / 100
- 技术栈
- Vite · React
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2025-09-13
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: f6cdfdc81f5b7a9009a4809b196f3ac8564a490286270e4e210f59bfa884f5f2
2026-10-02T11:42:57.454Z
来源文件 / 仓库# Vite React ReScript Starter - [Vite](https://vitejs.dev): Next Generation Frontend Tooling. - [React](https://reactjs.org): A JavaScript library for building user interfaces. - [ReScript](https://rescript-lang.org): The JavaScript-like language you have been waiting for. (previously known as BuckleScript and Reason) - [@jihchi/vite-plugin-rescript](https://github.com/jihchi/vite-plugin-rescript): Integrate ReScript with Vite seamlessly. - [vitest](https://vitest.dev/): A blazing fast unit-test framework, powered by [Vite](https://vitejs.dev) ⚡️. - [rescript-vitest](https://github.com/cometkim/rescript-vitest): ReScript bindings to Vitest. - [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/): Helps you test UI components in a user-centric way. - [Tailwind CSS](https://tailwindcss.com): A utility-first CSS framework for rapid UI development. ## Getting Started ```sh npx degit jihchi/vitejs-template-react-rescript my-vitejs-react-rescript cd my-vitejs-react-rescript npm install npm start ``` ## Alternatives - [rescript-lang/create-react-app](https://github.com/rescript-lang/create-rescript-app) ## Contributors Many thanks for your help! <a href="https://github.com/jihchi/vitejs-template-react-rescript/graphs/contributors"> <img src="https://contrib.rocks/image?repo=jihchi/vitejs-template-react-rescript" /> </a> The image of contributors is made with [contrib.rocks](https://contrib.rocks).
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

react-starter-kit
Modern React starter kit with Bun, TypeScript, Tailwind CSS, tRPC, Stripe, and Cloudflare Workers. Production-…
Vite · SaaS

cove
The Cove Stack: 🏝️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui
Vite · SaaS

vite-react-boilerplate
A production ready, scalable starter template for Vite + React
Vite · 启动器

react-vite-admin
This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. 全新技术栈的后台管理系统
Vite · 后台

typescript-react_best_practices-vite_template
<⚡⚛️> Start your React project with Vite following code best practices (TypeScript, Linting, testing, CI/CD…)
Vite · 启动器

cloudflare-starter-kit
Template (boilerplate) repository for scaffolding Cloudflare Workers projects
Vite · 启动器
