2 ms·
JavaScript tooling requires index files for everything, which makes development slow, particularly when you want to iterate fast or create many files with singl
by cyanydeez 2y ago
JavaScript tooling requires index files for everything, which makes development slow, particularly when you want to iterate fast or create many files with single output.
I think it makes sense to make the compiler or script loader to rely on just the file and their contents. Either way you're already defining everything, why create an additional redundant set of definitions.
- nophunphil 2y agoWhat do you mean by index files? It might depend on the bundler, but I haven’t heard of index.js/index.ts files being a hard requirement for a directory to be traversable in most tooling.
- bastawhiz 2y ago> JavaScript tooling requires index files for everything This just isn't true. I've never encountered tooling that forces you to have these by default. If it's enforced, it's rules defined in your project or some unusual tools
- ElectricalUnion 2y ago> JavaScript tooling requires index files for everything You mean barrel files? Those are horrible kludges used by lazy people to pretend they're hiding implementation details, generate arbitrary accidental circular imports, and end up causing absolute hell if you're using any sort of naive transpiling/bundling tooling/plugin/adapter.