All Projects → jaredpalmer → React Parcel Example

jaredpalmer / React Parcel Example

Minimum viable React app with Parcel Bundler

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Parcel Example

preact-typescript-parcel-starter
Starter with Preact - Typescript - Parcel Bundler
Stars: ✭ 51 (-89.55%)
Mutual labels:  parcel
mark
mark is an markdown editor app for mac
Stars: ✭ 47 (-90.37%)
Mutual labels:  parcel
11st-vue-app
[11번가 x 패스트캠퍼스] 신입 개발자 역량 육성 과정 FE 강의 예제.
Stars: ✭ 19 (-96.11%)
Mutual labels:  parcel
parcel-react
📦🚀 A minimal React.js boilerplate project with parcel as bundler.
Stars: ✭ 72 (-85.25%)
Mutual labels:  parcel
parcel-pixijs-quickstarter
Example App using pixiJS and Typescript bundled with parcel
Stars: ✭ 48 (-90.16%)
Mutual labels:  parcel
hyperapp-todo-parcel
marcusasplund.github.io/hyperapp-todo-parcel/
Stars: ✭ 12 (-97.54%)
Mutual labels:  parcel
serverless-plugin-parcel
A Serverless framework plugin to bundle assets with Parcel (ES6/7 or Typescript)
Stars: ✭ 23 (-95.29%)
Mutual labels:  parcel
React Suspense Starter
Experiment with React Suspense right meow.
Stars: ✭ 370 (-24.18%)
Mutual labels:  parcel
phoenix-elm-template
A starter repo with Phoenix, Elm 0.19, and Parcel
Stars: ✭ 16 (-96.72%)
Mutual labels:  parcel
cookiecutter-flask-react
Cookiecutter for a Flask+React project
Stars: ✭ 22 (-95.49%)
Mutual labels:  parcel
rocket-emoji
🚀 Find and copy an emoji to your clipboard in one click.
Stars: ✭ 42 (-91.39%)
Mutual labels:  parcel
wordpress-starter
Timber (Twig) + Parceljs Bundler
Stars: ✭ 19 (-96.11%)
Mutual labels:  parcel
blazingly-ssr
A blazing fast server side rendering & project optimiser cli tool using Parcel (POC/Experiment)
Stars: ✭ 41 (-91.6%)
Mutual labels:  parcel
vue-composition-api-ts-todo
ToDo List with Vue 3 Composition API and TypeScript
Stars: ✭ 69 (-85.86%)
Mutual labels:  parcel
parcel-static-template
Start a simple static site with components and hot reloading.
Stars: ✭ 20 (-95.9%)
Mutual labels:  parcel
parcel-plugin-url-loader
📦url loader for parcel, use base64 encode file
Stars: ✭ 24 (-95.08%)
Mutual labels:  parcel
parcelui
Parcel + Typescript + React/Preact + Router + CSS Modules + SASS + Jest + Api-Now + Github Actions CI
Stars: ✭ 32 (-93.44%)
Mutual labels:  parcel
Enferno
A Python framework based on Flask microframework, with batteries included, and best practices in mind.
Stars: ✭ 385 (-21.11%)
Mutual labels:  parcel
Flesh
Android上福利满满的app,宅男神器
Stars: ✭ 363 (-25.61%)
Mutual labels:  parcel
electron-react-parcel-boilerplate
A boilerplate for Electron + React + Parcel.
Stars: ✭ 60 (-87.7%)
Mutual labels:  parcel

React Parcel Example

A minimum viable React app with Parcel Bundler

What's inside?

  • parcel-bundler
  • react
  • react-dom
  • babel-preset-react-app
  • autoprefixer

Also checkout out the TypeScript branch

Getting started

Clone and install deps

git clone [email protected]:jaredpalmer/react-parcel-example.git
cd react-parcel-example
yarn
yarn start

Then open http://localhost:1234 and edit index.js and press save. Parcel will automagically hot reload you files whenever you make changes.

Building for Production

npm run build

This will compile your JS and copy your index.html to the dist folder which you can deploy wherever as a good ol' webpage.

CSS

Parcel uses PostCSS plugins to manage CSS assets. I've included autoprefixer for vendor prefixing with the same setup as create-react-app. You can find and modify the PostCSS setup in package.json. If you'd rather keep your PostCSS setup in a dotfile, you can delete the postcss key from package.json, and place its contents in a .postcssrc file too.

Folder structure and relative paths

Keeping everything in the root directory obviously won't scale past a point. Parcel is very flexible about folder structure, but there are a few gotchas.

Moving JS entry

When you do move index.js just make sure to update the <script> tag in index.html so that it points to the correct relative path.

For example, if you want to move index.js to src/index.js, you would need make the following change to index.html:

<   <script src="./index.js"></script>
---
>   <script src="./src/index.js"></script>

Moving index.html

If you want to move index.html, you will need to update your npm scripts in package.json with the new relative path.

Deployment

Refer to the deployment guide in create-react-app, just note that you will need to account for the fact that Parcel builds out to a dist directory, while CRA builds to a build directory. You can make it identical by adding --out-dir build to both start and build npm tasks in package.json.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].