refactor: Migrate website build from Gulp to Vite#213
Conversation
Deploying typestream with
|
| Latest commit: |
1e3c33e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://504dd850.typestream.pages.dev |
| Branch Preview URL: | https://website-vite-migration.typestream.pages.dev |
PR #213 Review: Migrate website build from Gulp to ViteSummaryThis PR successfully modernizes the website build system by replacing a 272-line Gulp configuration with Vite. The migration removes 17 gulp-related dependencies and adds only 2 new ones, resulting in a net reduction of ~14,500 lines (mostly from package-lock.json simplification). ✅ Strengths1. Excellent Build System Modernization
2. Proper Multi-Page App ConfigurationThe input: {
main: resolve(__dirname, "src/index.html"),
about: resolve(__dirname, "src/about.html"),
// ... all other pages
}3. Template Support MaintainedUsing 4. Modern SCSS Configurationscss: {
api: "modern-compiler",
silenceDeprecations: ["import"],
}This uses the modern Sass compiler API and properly handles deprecation warnings. 5. Build Verification✅ Build completes successfully in 2.73s
|
- Upgrade swiper from 4.5.0 to ^11.0.0 (fixes critical prototype pollution vulnerability) - Fix browserslist syntax: "version" → "versions" (plural) - Add .vite/ to .gitignore for Vite cache directory
Code Review: Gulp to Vite MigrationSummaryThis is a solid refactoring that modernizes the build system. The migration from Gulp to Vite is well-executed with significant dependency reduction and cleaner configuration. Overall, this is a positive change that should improve developer experience. ✅ Strengths
|
…ecation - Convert require() to ES imports for @tailwindcss/forms and daisyui - Add TODO comment explaining why silenceDeprecations is needed for @import
Technical Review: Gulp → Vite MigrationSummaryThis is a well-executed migration that successfully modernizes the build system. However, there are critical runtime bugs that must be fixed before merge. Impact: Net reduction of ~7,700 lines, 272-line Gulp config → 40-line Vite config, removes 15 dev dependencies. 🔴 Critical Issues (Must Fix)1. Missing Library Imports - BREAKING BUGSeverity: CRITICAL The files Missing from
Impact: Pages using these features will throw Fix for import feather from "feather-icons";
import { tns } from "tiny-slider";
import Tobii from "tobii";
import Gumshoe from "gumshoejs";
import WOW from "wow.js";
import Swiper from "swiper";
import Shuffle from "shufflejs";
import datepicker from "js-datepicker";
import Choices from "choices.js";
// Import required CSS
import "swiper/css";
import "choices.js/public/assets/styles/choices.min.css";
import "js-datepicker/dist/datepicker.min.css";
import "animate.css"; // For WOW.js
// Make globally available
window.feather = feather;
window.tns = tns;
window.Tobii = Tobii;
window.Gumshoe = Gumshoe;
window.WOW = WOW;
window.Swiper = Swiper;
window.Shuffle = Shuffle;
window.datepicker = datepicker;
window.Choices = Choices;2.
|
Summary
Changes
dev,build,preview), updated dependenciesTest plan
npm run devand verify hot reload worksnpm run buildand checkdist/outputnpm run previewto test production build locally