Skip to content
A minimal react boilerplate with webpack 4 πŸ“¦, babel v7 πŸš€ and sass support. 🎨
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
config
public
src
.babelrc
.eslintignore
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
index.js
jest.config.js
lint-staged.config.js
package.json
yarn.lock

README.md

minimal-react-boilerplate

A minimal react boilerplate with webpack 4, babel v7 and sass support.

  • Webpack 4 - All the good things from Webpack 4 including faster builds.

  • Babel 7

  • ESLint ( with prettier config ) - give the configuration a shot and thank me later. πŸ˜„

  • Husky - Pre-commit lint check for staged files to ensure πŸ’©-code is never commited.

  • CSS and SASS support.

  • Easy and cleaner imports with babel module resolver.

For example, if you have a directory structure like this:

src
-- components
-- config
---- secret-config.js
-- pages
---- home
------ index.js

You can import secret-config.js in index.js as :

import config from "config/secret-config.js";
  • Environment files - environment variable imports are already configured and added! Just create development.env and production.env ( inside config directory ) with your environment variables and start using them in your app! πŸŽ‰

  • Snapshots and DOM testing - Includes DOM testing with Jest and react-testing-library and also includes snapshot test examples with Jest. ( Bonus: CI configuration included for TravisCI )

Usage :

  1. Clone the repository via SSH :
$ git clone git@github.com:rishichawda/minimal-react-boilerplate.git

or HTTPS :

$ git clone https://github.com/rishichawda/minimal-react-boilerplate.git
$ cd minimal-react-boilerplate
$ npm install

Unfamiliar with git?

Simply click here to download the zip. Extract the .zip file and run the following commands inside the directory.

$ npm install
$ npm run start

To start the development server :

$ npm run start

To generate production build :

$ npm run build
You can’t perform that action at this time.