🍰 Recipes

React

First we need to install the dependencies for React.

Blog Post

npm install --save react
npm install --save react-dom
npm install --save-dev parcel-bundler

Or if you have the optional Yarn package manager installed

yarn add react
yarn add react-dom
yarn add --dev parcel-bundler

Add Start script to package.json

// package.json
"scripts": {
  "start": "parcel index.html"
}

Preact

First we need to install the dependencies for Preact.

npm install --save preact
npm install --save preact-compat
npm install --save-dev parcel-bundler
npm install --save-dev babel-preset-preact

Or if you have the optional Yarn package manager installed

yarn add preact
yarn add preact-compat
yarn add --dev parcel-bundler
yarn add --dev babel-preset-preact

Then make sure the following Babel config is present.

// .babelrc
{
  "presets": [
    "preact"
  ]
}

Add Start script to package.json

// package.json
"scripts": {
  "start": "parcel index.html"
}

Vue

First we need to install the dependencies for Vue.

npm install --save vue
npm install --save-dev parcel-bundler

Or if you have the optional Yarn package manager installed

yarn add vue
yarn add --dev parcel-bundler

Add Start script to package.json

// package.json
"scripts": {
  "start": "parcel index.html"
}