DEV Community

Discussion on: React Beginner Question Thread ⚛

 
dan_abramov profile image
Dan Abramov

Good to know! I guess webpack is smart enough to do the replacement earlier :-). This is still not a great future-proof approach because it relies on requires whereas the ecosystem has been moving to ES modules. It’s also much harder for any other tools to understand what’s going on in your modules.