Webpack 5 Configuration Multi Brand Boilerplate

Node Version 14.15.0

Supports

  • React
  • Babel
  • SCSS + PostCss
  • Images/SVG/Fonts
  • Nunjucks templating for static html components
  • Json-server for mock api requests (GET, PUT, POST....)

Commands

  • npm install
  • npm run start:brand-one or npm run start:brand-two (runs json-server concurrently on port 3004)

JSON Server Mock Endpoints

  • In ./src/pages/_api/ create your json files to serve
  • Ensure endpoint name is in the json file as the parent field (how json-server works under the hood)
  • Configuration file ./src/pages/_server/index.js

References

  • Nunjucks HTML templating docs https://mozilla.github.io/nunjucks/templating.html
  • JSON-Server docs https://github.com/typicode/json-server

Improvements/Bugs

  • Resolve background images in SCSS files