Assuming the current setup of babel+webpack the difference between your naive version is just ~0.5 kB.