4 ms·
This is the kind of thing that should be fixed by improving tooling, rather than making your source less clear. Given the opportunity that was mjs, bun, deno, e
by Sophistifunk 3y ago
This is the kind of thing that should be fixed by improving tooling, rather than making your source less clear. Given the opportunity that was mjs, bun, deno, etc it's clear that file-based and url-based, and relative imports are things people don't want to move away from in the current JS ecosystem, which means "barrel files" (the name makes no sense to me either) are going to remain a useful part of trying to cut down on the noise.
- skybrian 3y agoA fundamental problem in the JavaScript ecosystem is mixing up source files and "binary" (optimized, minified) files. URL imports seem like a bad move because they can point to either. Sourcemaps help somewhat, but even with Deno, when using an IDE, the source you want is often in another castle. You might get minimized code or type definitions. Contrast with the Go system which rarely has this problem. Following imports goes to source.
- Sophistifunk 3y agoYeah this seems to be absolutely everywhere and entrenched, mainly because it's how npm did things :(