Usually I write import {x} from "./foo”
Riccardo Scalco
2

It wouldn’t make any sense for the browsers to make this inference (unless it’s on a file:/// protocol?). The extension-less option depends on the end of the loading mechanism to decide what to serve.

In Node.js for example it would manually check the filesystem for the path against extensions.

However, the browser does not have access to the filesystem of the server. The web server does. Thus it needs to decide what to serve from that request.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.