Skip to content

πŸ“¦ β€Ž A sensible webpack 5 boilerplate.

License

Notifications You must be signed in to change notification settings

nikmihalevich/webpack-boilerplate

Repository files navigation

Webpack 5 Boilerplate

React 18, Typescript

ESLint, Jest, RTL, Storybook 7

linting, testing, building

Tech stack:

Config

The app uses absolute path with alias '@'

import App from '@/app/App' // import App.tsx file

Also, strict mode is included. In order to initially monitor the high quality of the code.

Installation

Requires Node.js v18+ to run.

Install the dependencies and devDependencies.

npm i

Usage

Development server

webpack-dev-server

npm run start

You can view the development server at localhost:3000.

Development build

To make not minified compiled bundle with devs feature.

npm run build:dev

Production build

To make minified compiled bundle without devs feature.

npm run build:prod

Linting

ESLint

npm run lint:ts
npm run lint:ts:fix

Stylelint

npm run lint:scss
npm run lint:scss:fix

Prettier

npm run prettier

Testing

Unit test - Jest

npm run test:unit

Storybook

npm run storybook # to start storybook
npm run storybook:build # to compile in static

Dependencies

webpack

Babel

Loaders

Plugins

Linters

Author

License

This project is open source and available under the MIT License.