2 ms·
There is one. Which is that you can’t easily do an inline require any more. The rest of the text can mostly be summarized as https://xkcd.com/927/ https://xkcd
by Aeolun 5y ago
There is one. Which is that you can’t easily do an inline require any more.
The rest of the text can mostly be summarized as https://xkcd.com/927/ https://xkcd.com/927/
- tehbeard 5y agoInline require(...), Are we back to bad old days of PHP include '...'; midway through a classes function already?
- bricss 5y agoinline require is most likely a bad design, imo
- nrabulinski 5y agoI’ve been working with node for roughly 5 years and I’ve never liked the hackieness CJS let people incorporate. People, especially a few years ago, were trying to get clever with the require calls, were fiddling around with require cache and while with ESM we no longer can “easily” do stuff like dynamic reloads, I genuinely feel it’s for the better. I strongly agree with privatenumber’s point that import() syntax is the true first class citizen here.