Skip to content

OleksandrKucherenko/webpack.config

Repository files navigation

Webpack.config

Tools

Dev Environment Setup

Steps

image

graph LR;
  A[React App] --> P[Webpack\nDev Server\nProxy];
  P -->|`/api` ~> `https://localhost:8280`| B[Mocks Server\nport: 8280, 9280];
  B -->|HTTP| C[Json Server\nport:8282];
  C -.->|HTTP| B;
  B -.->|HTTPS| A;
Loading

Export HAR to mocks-server collections/routes:

# convert HAR file to set of JSON files that mocks-server can automatically load
mocks/scripts/export.har.ts ./mocks/fixtures/16b19ff8-640f-4489-af03-9adff0e902da/recorded.har

details: mocks-server

TODO

  • Inject environment variables REACT_APP_*
  • Define environment variables into webpack
  • Support proxy configuration for Dev Server
  • Support Jest
  • Support Cypress
  • Support EsLint
  • Support Prettier
  • Support browserslist
  • Compose a manifest file for the project

About

Bootstrap repo for webpack 5 react projects

Resources

License

Stars

Watchers

Forks