A good starting point for using webpack to build stuffs.
Tested on both Windows and macOS, with:
Node=16.15.1Yarn=3.2.4
- Fully customizable webpack-based building system.
- Support webpack 5, React 18, TypeScript, Sass, Less, Tailwind CSS, etc.
- Support Hot Module Replacement (HMR).
- Support ESLint, stylelint, and Prettier.
- Support husky, lint-staged, and commitlint.
- Edit
webpack.config.jsand update the configuration fieldentryto determine what to be built;
# Install dependencies
yarn install
# Start dev server
yarn run start
# Build application
yarn run build
# Commit
yarn commit
# Release
yarn releaseTo use Hot Module Replacement, please place components outside of the top-level file. Components in the top-level file will be downgraded to live reload.
CSS's naming convention requires the class names to be in kebab-case. However, in JavaScrip, it is not allowed to write style.my-style and only accepts style['my-style'] or style.myStyle. It is not convenient. Therefore, in this boilerplate, the class names in css-modules will be converted from kebab-case to camelCase to allow usages such as style.myStyle.
-
Icons made by Freepik from www.flaticon.com