In an application with code-splitting, dynamic import() is used as signals to do code splitting and lazy loading. But dynamic import() also exists in non-code-splitting applications.
Is there a TRUE use case in which dynamic import() is useful, i.e., improves dev experience or performance?
const ns = await import('./lazy');
is transpiled to the following in node.js by default:
const ns = await Promise.resolve().then(() => require('./lazy'));