Why we switched from Webpack to Vite

Why we switched from Webpack to Vite

https://news.ycombinator.com/item?id=26972400

Vite is a JavaScript build tool that provides a fast and lean development experience. Vite comes with a number of features including HMR, or Hot Module Replacement, a build command that bundles your tools with Rollup, and built-in support for TypeScript and JSX.

How it works

Vite works by treating your source code and your dependencies differently. Unlike your source code, dependencies don’t change nearly as often during development. Vite takes advantage of this fact by pre-bundling your dependencies using esbuild. Esbuild is a JS bundler written in Go that bundles dependencies 10-100x faster than JavaScript based alternatives like Webpack and Parcel.

Read More

Build Steps and Deployment (Austin Pray)

Based on the discussion over here: roots/roots/pull/1257.

These days your web project probably has a build step. Your build step takes your styles, scripts, and other assets and packages them for the browser. Maybe you are using gulp, grunt, or even make to orchestrate all your compilation steps. This post covers a couple methods for deploying projects with compiled assets and each method’s respective gotchas.

Source: Build Steps and Deployment