<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>vite on 编程那些事儿</title><link>https://before80.github.io/prgms/Js/tools/build/vite/</link><description>Recent content in vite on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 28 Mar 2026 12:23:33 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Js/tools/build/vite/index.xml" rel="self" type="application/rss+xml"/><item><title>第1章 认识 Vite</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-01-Knowing-Vite/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-01-Knowing-Vite/</guid><description>&lt;h1 id="chapter-01-knowing-vite"&gt;Chapter-01-Knowing-Vite&lt;/h1&gt;
&lt;h1 id="第1章认识-vite"&gt;第1章：认识 Vite&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;在正式开始之前，让我们先来一场时光旅行。回到2018年，彼时的前端江湖还是 Webpack 的天下。那一年，你打开一个中大型项目，喝了杯咖啡，回来发现——浏览器还在转圈圈。🥲&lt;/p&gt;</description></item><item><title>第2章 环境准备与安装</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-02-Environment-Setup/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-02-Environment-Setup/</guid><description>&lt;h1 id="chapter-02-environment-setup"&gt;Chapter-02-Environment-Setup&lt;/h1&gt;
&lt;h1 id="第2章环境准备与安装"&gt;第2章：环境准备与安装&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;古人云：&amp;ldquo;工欲善其事，必先利其器。&amp;rdquo; 在正式开始写代码之前，我们得先把开发环境整利索了。&lt;/p&gt;
&lt;p&gt;这一章，我们会解决几个灵魂拷问：&lt;/p&gt;</description></item><item><title>第3章 Vite 基础使用</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-03-Vite-Basics/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-03-Vite-Basics/</guid><description>&lt;h1 id="chapter-03-vite-basics"&gt;Chapter-03-Vite-Basics&lt;/h1&gt;
&lt;h1 id="第3章vite-基础使用"&gt;第3章：Vite 基础使用&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;恭喜你成功安装了 Vite，并运行了第一个项目！现在，我们要把这个&amp;quot;会用&amp;quot;变成&amp;quot;用得溜&amp;quot;。&lt;/p&gt;
&lt;p&gt;这一章，我们来细细拆解 Vite 项目的每一个组成部分：入口 HTML 里藏着什么秘密？命令行的各种参数都是干嘛的？ES Modules 怎么玩？CSS、图片、JSON 这些资源怎么导入？路径别名怎么配？&lt;/p&gt;</description></item><item><title>第4章 vite.config.js/ts 详解</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-04-Vite-Config/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-04-Vite-Config/</guid><description>&lt;h1 id="chapter-04-vite-config"&gt;Chapter-04-Vite-Config&lt;/h1&gt;
&lt;h1 id="第4章viteconfigjsts-详解"&gt;第4章：vite.config.js/ts 详解&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;如果说 Vite 是一个王国，那 &lt;code&gt;vite.config.js&lt;/code&gt; 就是这个王国的宪法——它定义了 Vite 的一切行为。&lt;/p&gt;
&lt;p&gt;前面我们只是蜻蜓点水地看了看配置文件的皮毛，这一章我们要把它彻底讲透：root、base、publicDir、cacheDir 等基础配置；server 里的端口、代理、HMR；build 里的输出、优化、分包；resolve 里的别名、扩展名；optimizeDeps 里的预构建；CSS、PostCSS、LogLevel&amp;hellip; 每一个配置项，我们都要讲清楚它是什么、怎么用、什么时候用。&lt;/p&gt;</description></item><item><title>第5章 插件系统</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-05-Plugin-System/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-05-Plugin-System/</guid><description>&lt;h1 id="chapter-05-plugin-system"&gt;Chapter-05-Plugin-System&lt;/h1&gt;
&lt;h1 id="第5章插件系统"&gt;第5章：插件系统&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;如果把 Vite 比作一辆汽车，那插件就是它的&amp;quot;外挂装备&amp;quot;——可以让汽车上天入地、潜水遁地。&lt;/p&gt;
&lt;p&gt;Vite 的插件系统借鉴了 Rollup 的插件设计，但又增加了一些 Vite 独有的钩子（Hooks）。有了插件，Vite 可以支持 Vue JSX、React、SSR、PWA、CSS Modules、CSS-in-JS、Mock 数据、图片压缩&amp;hellip; 几乎你能想到的一切功能。&lt;/p&gt;</description></item><item><title>第6章 CSS 处理</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-06-CSS-Processing/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-06-CSS-Processing/</guid><description>&lt;h1 id="chapter-06-css-processing"&gt;Chapter-06-CSS-Processing&lt;/h1&gt;
&lt;h1 id="第6章css-处理"&gt;第6章：CSS 处理&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;CSS 是前端开发中最&amp;quot;朴素&amp;quot;又最&amp;quot;复杂&amp;quot;的存在。说它朴素，是因为它语法简单到小学生都能写；说它复杂，是因为当你项目变大、团队协作、浏览器兼容、性能优化这些因素叠加进来时，CSS 就变成了一个深不见底的技术黑洞。&lt;/p&gt;</description></item><item><title>第7章 静态资源与构建优化</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-07-Assets-And-Optimization/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-07-Assets-And-Optimization/</guid><description>&lt;h1 id="chapter-07-assets-and-optimization"&gt;Chapter-07-Assets-And-Optimization&lt;/h1&gt;
&lt;h1 id="第7章静态资源与构建优化"&gt;第7章：静态资源与构建优化&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;为什么我的网站加载那么慢？&amp;ldquo;这是前端性能优化的灵魂拷问。&lt;/p&gt;
&lt;p&gt;造成网页加载慢的原因有很多：图片太大、JavaScript 打包太臃肿、HTTP 请求太多、没有缓存策略、没有压缩&amp;hellip; 这一章，我们就把这些问题一一击破。&lt;/p&gt;</description></item><item><title>第8章 Vite + Vue 实战</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-08-Vite-Vue/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-08-Vite-Vue/</guid><description>&lt;h1 id="chapter-08-vite-vue"&gt;Chapter-08-Vite-Vue&lt;/h1&gt;
&lt;h1 id="第8章vite--vue-实战"&gt;第8章：Vite + Vue 实战&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;如果说 Vue 3 是尤雨溪的得意之作，那 Vite 就是让 Vue 开发者&amp;quot;爽到飞起&amp;quot;的利器。两者的结合，堪称&amp;quot;天作之合&amp;quot;。&lt;/p&gt;</description></item><item><title>第9章 Vite + React 实战</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-09-Vite-React/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-09-Vite-React/</guid><description>&lt;h1 id="chapter-09-vite-react"&gt;Chapter-09-Vite-React&lt;/h1&gt;
&lt;h1 id="第9章vite--react-实战"&gt;第9章：Vite + React 实战&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;React 和 Vue 是前端框架界的&amp;quot;两大巨头&amp;quot;。如果说 Vue 3 是尤雨溪的精心之作，那 React 就是 Facebook（Meta）出品的&amp;quot;老牌劲旅&amp;quot;。&lt;/p&gt;</description></item><item><title>第10章 Vite + TypeScript</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-10-Vite-TypeScript/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-10-Vite-TypeScript/</guid><description>&lt;h1 id="chapter-10-vite-typescript"&gt;Chapter-10-Vite-TypeScript&lt;/h1&gt;
&lt;h1 id="第10章vite--typescript"&gt;第10章：Vite + TypeScript&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;TypeScript——JavaScript 的超集，为 JavaScript 添加了静态类型系统。&lt;/p&gt;
&lt;p&gt;很多人一开始觉得 TypeScript 麻烦，每次写代码都要定义类型。但当你写过几个大型项目后，就会发现：TypeScript 的&amp;quot;前期麻烦&amp;quot;能换来&amp;quot;后期的省心&amp;quot;——类型错误在编译时就发现了，而不是等到线上出 BUG。&lt;/p&gt;</description></item><item><title>第11章 开发服务器进阶</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-11-Development-Server-Advanced/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-11-Development-Server-Advanced/</guid><description>&lt;h1 id="chapter-11-development-server-advanced"&gt;Chapter-11-Development-Server-Advanced&lt;/h1&gt;
&lt;h1 id="第11章开发服务器进阶"&gt;第11章：开发服务器进阶&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;恭喜你已经掌握了 Vite 的基础用法，能跑起来、能热更新、能把项目跑起来不报错——这已经很棒了！但如果你的目标是&amp;quot;专业级&amp;quot;前端开发者，那这一章就是你的必经之路。&lt;/p&gt;</description></item><item><title>第12章 生产构建优化</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-12-Production-Build-Optimization/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-12-Production-Build-Optimization/</guid><description>&lt;h1 id="chapter-12-production-build-optimization"&gt;Chapter-12-Production-Build-Optimization&lt;/h1&gt;
&lt;h1 id="第12章生产构建优化"&gt;第12章：生产构建优化&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;开发时飞快，那叫一个爽。但代码最终是要部署上线的，上线之后能不能&amp;quot;飞起来&amp;quot;，就全靠生产构建优化了。&lt;/p&gt;
&lt;p&gt;这一章我们要聊的话题直接决定了你的网站&amp;quot;快不快&amp;quot;：Rollup 怎么配置？代码怎么压缩？Tree Shaking 怎么做？产物怎么分析？兼容怎么处理？CDN 怎么接？&lt;/p&gt;</description></item><item><title>第13章 测试与调试</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-13-Testing-And-Debugging/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-13-Testing-And-Debugging/</guid><description>&lt;h1 id="chapter-13-testing-and-debugging"&gt;Chapter-13-Testing-And-Debugging&lt;/h1&gt;
&lt;h1 id="第13章测试与调试"&gt;第13章：测试与调试&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;测试？那是什么？能吃吗？&amp;rdquo;&lt;/p&gt;
&lt;p&gt;如果你也是这么想的，那这章就是你的&amp;quot;觉醒时刻&amp;quot;。没有测试的代码就像没有安全带的赛车——可能跑得很快，但一出事就是大事。&lt;/p&gt;</description></item><item><title>第14章 完整项目实战</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-14-Project-Practice/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-14-Project-Practice/</guid><description>&lt;h1 id="chapter-14-project-practice"&gt;Chapter-14-Project-Practice&lt;/h1&gt;
&lt;h1 id="第14章完整项目实战"&gt;第14章：完整项目实战&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;纸上得来终觉浅，绝知此事要躬行。&lt;/p&gt;
&lt;p&gt;前面 13 章我们学了 Vite 的各种知识点，但&amp;quot;知道&amp;quot;和&amp;quot;会用&amp;quot;之间还隔着一道鸿沟——实战。这一章，我们要跨过这道鸿沟。&lt;/p&gt;</description></item><item><title>第15章 Vite 核心原理</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-15-Vite-Core-Principles/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-15-Vite-Core-Principles/</guid><description>&lt;h1 id="chapter-15-vite-core-principles"&gt;Chapter-15-Vite-Core-Principles&lt;/h1&gt;
&lt;h1 id="第15章vite-核心原理"&gt;第15章：Vite 核心原理&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;你已经会用 Vite 了——创建项目、配置插件、写代码、构建部署，一条龙服务。但你有没有想过：Vite 背后到底是怎么工作的？&lt;/p&gt;
&lt;p&gt;为什么开发时启动这么快？为什么 HMR 能做到毫秒级更新？为什么生产构建用的是 Rollup 而不是 Vite 自己？&lt;/p&gt;</description></item><item><title>第16章 esbuild 与 Rollup</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-16-esbuild-And-Rollup/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-16-esbuild-And-Rollup/</guid><description>&lt;h1 id="chapter-16-esbuild-and-rollup"&gt;Chapter-16-esbuild-And-Rollup&lt;/h1&gt;
&lt;h1 id="第16章esbuild-与-rollup"&gt;第16章：esbuild 与 Rollup&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Vite 的极速体验，背后有两个功臣：&lt;strong&gt;esbuild&lt;/strong&gt; 和 &lt;strong&gt;Rollup&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;esbuild 负责&amp;quot;快&amp;quot;——开发时的依赖预构建、TypeScript 转译、JSX 转译，它都能在毫秒级完成。&lt;/p&gt;</description></item><item><title>第17章 编写自定义插件</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-17-Custom-Plugins/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-17-Custom-Plugins/</guid><description>&lt;h1 id="chapter-17-custom-plugins"&gt;Chapter-17-Custom-Plugins&lt;/h1&gt;
&lt;h1 id="第17章编写自定义插件"&gt;第17章：编写自定义插件&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;你已经用过很多插件了——Vue 插件、React 插件、PWA 插件、自动导入插件&amp;hellip;&lt;/p&gt;
&lt;p&gt;但你有没有想过：&lt;strong&gt;自己写一个 Vite 插件&lt;/strong&gt;？&lt;/p&gt;
&lt;p&gt;其实 Vite 插件并不神秘，它就是一段遵循特定规范的代码。这一章，我们就从零开始，手把手教你写一个自己的 Vite 插件。&lt;/p&gt;</description></item><item><title>第18章 Monorepo 与大型项目</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-18-Monorepo-And-Large-Projects/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-18-Monorepo-And-Large-Projects/</guid><description>&lt;h1 id="chapter-18-monorepo-and-large-projects"&gt;Chapter-18-Monorepo-And-Large-Projects&lt;/h1&gt;
&lt;h1 id="第18章monorepo-与大型项目"&gt;第18章：Monorepo 与大型项目&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;想象一下这个场景：你在维护 5 个前端项目，每个项目都有相似的配置、相似的工具函数、相似的组件。然后某天，你发现一个工具函数有 bug，需要在 5 个项目中都改一遍&amp;hellip;&lt;/p&gt;</description></item><item><title>第19章 SSR 与 SSG</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-19-SSR-And-SSG/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-19-SSR-And-SSG/</guid><description>&lt;h1 id="chapter-19-ssr-and-ssg"&gt;Chapter-19-SSR-And-SSG&lt;/h1&gt;
&lt;h1 id="第19章ssr-与-ssg"&gt;第19章：SSR 与 SSG&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;传统的 Vue/React 应用都是&amp;quot;客户端渲染&amp;quot;（CSR）——浏览器下载一个空的 HTML，然后 JavaScript 去请求数据、渲染页面。&lt;/p&gt;
&lt;p&gt;这带来了两个问题：&lt;strong&gt;SEO 不友好&lt;/strong&gt;（搜索引擎看到的是空页面）和&lt;strong&gt;首屏加载慢&lt;/strong&gt;（需要等 JS 下载完才能看到内容）。&lt;/p&gt;</description></item><item><title>第20章 前沿探索与展望</title><link>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-20-Frontier-Exploration/</link><pubDate>Fri, 27 Mar 2026 17:13:00 +0800</pubDate><guid>https://before80.github.io/prgms/Js/tools/build/vite/Chapter-20-Frontier-Exploration/</guid><description>&lt;h1 id="chapter-20-frontier-exploration"&gt;Chapter-20-Frontier-Exploration&lt;/h1&gt;
&lt;h1 id="第20章前沿探索与展望"&gt;第20章：前沿探索与展望&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;恭喜你！能走到这里的同学，已经是 Vite 的深度玩家了。&lt;/p&gt;
&lt;p&gt;这一章，我们来放眼未来，看看前端构建工具领域的最新动态：Rspack 这个&amp;quot;性能怪兽&amp;quot;、边缘计算的崛起、AI 辅助开发的革命、以及 Vite 生态的未来趋势。&lt;/p&gt;</description></item></channel></rss>