Every once in a while, I see or hear someone complaining that a basic React application ran through Webpack ends up being 700 kB or more. I think it’s important to take a look at why this is happening – cause it’s usually all about the environment.
When you’re in development, what you want is:
- Quick builds
- Being able to trace an error back to the correct line number
- Warnings if you’re doing something wrong
When you’re in production, what you want is:
- Smallest bundle size
- Fastest execution