Skip to content

DENISmer/webpack5-react-ts-config

Repository files navigation

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:

  1. no TS support.
  2. no support for scss modules.
  3. and etc.

This webpack5 configuration will allow you to use the following core technology stack:

  1. React
  2. TS
  3. CSS
  4. SCSS
  5. SCSS modules
  6. support for the following file extensions: (png|jpe?g|gif|svg|webp|ico) and (woff2?|eot|ttf|otf)
  7. and etc.

All you need to use this config:

  1. clone this repository
git clone https://github.com/DENISmer/webpack5-react-ts-config
  1. installing dependencies
npm install
  1. 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

About

Configuration for projects on React + ts + scss + scss modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors