ashleydavis / react-parcel-typescript-example

The simplest possible example of a frontend built with TypeScript and React and bundled with Parcel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend example with Parcel, React and Less

This is the simplest possible example of a frontend built with TypeScript and React and bundled with Parcel (v2).

If you like this project, please star this repo and support my work

Setup

You need Node.js installed to use this code.

Uses pnpm because it's faster than npm.

First install pnpm:

npm install -g pnpm

Then clone this repo then install dependenices:

pnpm install

Serve the web page with live reload

pnpm start

Open a browser and navigate to http://localhost:1234/.

Build the static web page

pnpm run build

The static web page is output to the dist subdirectory.

You can test it using live-server:

cd dist
npx live-server

Build the TypeScript code

Do this if you want to check for compile errors.

pnpm run compile

About

The simplest possible example of a frontend built with TypeScript and React and bundled with Parcel.


Languages

Language:HTML 49.2%Language:TypeScript 41.3%Language:Less 7.9%Language:Batchfile 1.5%