Hi!
Initially, a project was made according to this article, and also described in this repository and this, but the configuration described in these links did not suit me for several reasons:
- no TS support.
- no support for scss modules.
- and etc.
- React
- TS
- CSS
- SCSS
- SCSS modules
- support for the following file extensions: (png|jpe?g|gif|svg|webp|ico) and (woff2?|eot|ttf|otf)
- and etc.
- clone this repository
git clone https://github.com/DENISmer/webpack5-react-ts-config
- installing dependencies
npm install
- run the required script:
"start": "cross-env SERVE=true webpack serve --mode development" // run dev-server
"build": "webpack" // simple build
"build-prod": "webpack --mode=production" // create production build
"local-deploy": "npx serve -s build" // local deploying (if a build was previously made)
"deploy": "gh-pages -d build" // deploying on gh-pages (if a build was previously made)
"clean": "rd /s /q build" // clean the build derictory
"cb-dep": "npm run clean && npm run build-prod && npm run deploy" // clean ./build -> create production build -> deploy on gh-pages