2 ms·
The `import<TModule>(url: string): Promise<TModule>` syntax/special function was what the TC39 committee agreed to for lazy/dynamic imports after much bikeshedd
by WorldMaker 8y ago
The `import<TModule>(url: string): Promise<TModule>` syntax/special function was what the TC39 committee agreed to for lazy/dynamic imports after much bikeshedding. It's a Stage 3 ES proposal [1], which means it is likely in the next ES spec version, and is already supported in some browsers and many tools (such as webpack).
[1] https://github.com/tc39/proposal-dynamic-import https://github.com/tc39/proposal-dynamic-import