Closed robinvdvleuten closed 3 years ago
This should be okay, because those require() statements will be resolved to preact/compat
by Node. Though I believe right now external dependencies that require React can end up with their own copy - to fix that we need to switch from npm aliases to module-alias
.
Just checked with current master
and react
is not present in any bundler or chunk 🎉
When Next.js is bundling for server side rendering, all dependencies are externalized. So when you inspect the bundle output, you'll see that React is still used;