Creating React App using Vite and PNPM

<p>As of now Create React App (CRA) is no longer the recommended way to start a react project. There have been many alternatives in ecosystem to pick from. One of such alternative which is gaining lots of attention is using the combination of Vite and PNPM.</p> <h1>What is Vite?</h1> <ul> <li>To put it in few words, Vite is 10&ndash;100x faster than other JavaScript-based bundlers.</li> <li>This is because it&rsquo;s written in Go and its dependencies are pre-bundled with esbuild.</li> <li>Also vite served the source code as native ESM, enabling on-demand transformation and loading for improved developer productivity.</li> </ul> <h1>What is PNPM?</h1> <ul> <li>PNPM is a faster alternative to npm and yarn which optimizes your disk space and boost up your installation speed.</li> <li>You can also check out the&nbsp;<a href="https://pnpm.io/benchmarks" rel="noopener ugc nofollow" target="_blank">bench mark page&nbsp;</a>for more detailed analysis.</li> </ul> <h1>Building the Hello world App</h1> <p>For using vite and pnpm make sure you must have node version 16+ installed.</p> <p>Once you have the correct node setup, you can now install&nbsp;<code>pnpm</code>&nbsp;. Run the below command to install latest version of&nbsp;<code>pnpm</code>&nbsp;.</p> <p><a href="https://medium.com/@sahu.jyotirmaya26/creating-react-app-using-vite-and-pnpm-746bb0f9a0c2">Click Here</a></p>
Tags: PNPM SWC