How to mock the backend with Webpack Dev Server
This is a very useful pattern I was using with my team at TransferWise to mock the backend. Spinning up an entire stack in a codebase with many microservices is a no go, so this is the best solution to improve the productivity of the frontend teams, that I found. To begin with I opted for creating two different webpack.config.xxx.js files, a dev file and a prod file. At webpack.config.dev.js you add the following:...