Perk Interview Question

How does webpack works and why frontend projects use it?