1.2.1 • Published 3 years ago

frontend-marketplace v1.2.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

React-Webpack-4-Babel-7-starter-boilerplate

Startup boilerplate of React16.x + Webpack 4 + Babel 7 (HMR enabled) + ESLint

React-Webpack-4-Babel-7-boilerplat

How to start?

Installation

  • Clone or download the repo.

    git clone https://github.com/varunalex/react-webpack-4-babel-7-starter-boilerplate.git

  • Navigate to cloned folder and run

    npm install

Usage

  • Start development server - build app continuously (HMR enabled) @ http://localhost:8080

    npm run start

  • Pre-build - dist/ - Build app for production

    npm run prebuild

  • Build - Build app once (HMR disabled) and serve @ http://localhost:3000

    npm run build

Basically if we write the word pre for a script, in this case prebuild, every time we run our command npm run build it will first execute npm run prebuild and then run the script npm run build

Notes :

  • At config/webpack.prod.config.js: The optimization.splitChunks actually takes all of your common code and creates a vendor.bundle.js file. Currently this segment is commented. If you want to use splitChunks feel free to uncomment the code segment. For more : splitChunks

  • Run prebuild after updating static assets and point source of the dist/ folder.

 <img alt="header" src="/dist/images/header.png"  className="app-header" />
  • Eslint : You can use your favorite eslint rules set. By default airbnb eslint configurations has installed.

What's include?

Contribute

Please contribute to the project if you know how to make it better, including this README :)