DEV Community

Cover image for My React 17 Boilerplate (with Webpack 5, Tailwind 2)
Stefan Wuthrich
Stefan Wuthrich

Posted on Edited on

My React 17 Boilerplate (with Webpack 5, Tailwind 2)

I published my first React Boilerplate with React 17, Tailwind 2, using babel, sass, with a hot dev server and an optimized production build.
Any feedback is welcome :-)

Looking for a React Job?

Checkout the React Jobs Board with OnSite and Remote React Jobs

Updated (newest first):

  • added SVGR as a webpack loader to import your SVG directly as a React Component.
  • added build-staging script. same as build but using .env.staging
  • added dotenv-webpack to handle process.env.VARS
  • added Prettier
  • added react-refresh-webpack-plugin for HMR
  • 2 PR's accepted

Github repo

Installation

git clone https://github.com/altafino/react-webpack-5-tailwind-2.git
cd react-webpack-5-tailwind-2
yarn / npm i
⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini ⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini

Usage

Development server

yarn start / npm start
⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini ⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini

You can view the development server at localhost:3000.
(change port in ./config/webpack.dev.js)

Production build

 yarn build / npm run build
⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini ⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini

Features

Dependencies

webpack

Babel

Loaders

Eslint

Plugins

Cheers
Stefan - Fullstack Developer - Go/JS

Top comments (6)

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
dendihandian profile image
Dendi Handian • • Edited

I mistook WP as WordPress here

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
golangch profile image
Stefan Wuthrich •

Fixed ;-)

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
hamzahsn profile image
A.Hamza •

I thought that webpack 5 already comes with terser plugin so you don't have to add it to your project ;)

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
ujjwalkr profile image
Ujjwal Kumar •

cool stuff

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
golangch profile image
Stefan Wuthrich •

Got first PR which add Husky Lint Hook

⭐ Football Update: golangch/my first public react boilerplate with wp tailwind pc - Pertandingan Hari Ini
 
golangch profile image
Stefan Wuthrich •
  • added dotenv-webpack to handle process.env.VARS
  • added react-refresh-webpack-plugin for HMR