3 ms·
I think you're thinking of module bundlers, which need to be able to resolve the import statically in order to do code-splitting etc. There's no such limitation
by rich_harris 6y ago
I think you're thinking of module bundlers, which need to be able to resolve the import statically in order to do code-splitting etc. There's no such limitation at runtime.
- eyelidlessness 6y agoEven so they do tend to have facilities for dynamic imports of that kind, but it’s generally bad for bundle size and should be used sparingly.