react-boilerplate

This is a react boilerplate using parcel.

Optional Configuration

Babel

If you want to customize babel settings, install the following packages:

npm install -D babel-eslint @babel/core @babel/preset-env @babel/preset-react

Install the plugins you want to enable. For example, class properties:

npm install -D @babel/plugin-proposal-class-properties

Create a file .babelrc:

{
  "presets": ["@babel/preset-react", "@babel/preset-env"],
  "plugins": ["@babel/plugin-proposal-class-properties"]
}

Add the following to .eslintrc.json:

{
  "parser": "babel-eslint"
}

CSS In JS

Install emotion:

npm install @emotion/core @emotion/babel-preset-css-prop

Add this to your .bablerc:

{
  "presets": [
    "@babel/preset-react",
    "@babel/preset-env",
    [
      "@emotion/babel-preset-css-prop",
      {
        "sourceMap": false
      }
    ]
  ]
}