Simple Webpack 5 React Starter. It contains:
- React 17.0.2
- Latest Webpack 5 (v5.58.1) and Webpack Dev Server 4 (v4.13.1) with Scope Hoisting enabled
- Babel 7
- ECMAScript 6+ and JSX support
- Hot Module Replacement
- Production config
- Export separate vendor and runtime files
- Sass/SCSS support
- Separate CSS stylesheets generation
- ES6 linting with continuous linting on file change
- Stylelint
- Prettier
- Linting files and commit messages on commit
- SVG and image files support
- Commitizen
- Automated versioning and CHANGELOG generation
- Webpack Bundle Analyzer
- Node (Make sure you have the node 12+ installed)
- Clone the repository
gh repo clone piotrlewandowski/webpack-5-react-starter
(or if you're not using GitHub CLI:git clone git@github.com:piotrlewandowski/webpack-5-react-starter.git
) - If you're using NVM run
nvm use
inside project directory to use node version set in.nvmrc
file - Run
npm install
ornpm i
to install all the dependencies - To begin development task, run
npm start
- Open http://localhost:8080
npm clean
- delete thedist
foldernpm start
- start the dev server and watch for changesnpm run build
- create a production ready build indist
foldernpm run profile
- generate interactive treemap visualization of the contents of the bundlenpm run eslint:check
- execute eslint checknpm run eslint:fix
- execute eslint check and automatically fix problemsnpm run stylelint:check
- execute stylelint checknpm run stylelint:fix
- execute stylelint check and automatically fix problems