News for hackers. Stuff that matters.
Re:Speeding up the JavaScript ecosystem – The barrel file de... by h1fra on Monday October 09, 2023 @05:44AM (#37818673)
Unless you are working in a single process script, barrel file is almost unavoidable. A typical nodejs app will often be split in many packages, requiring barrel file anyway.
Re:Speeding up the JavaScript ecosystem – The barrel file de... by agos on Monday October 09, 2023 @08:45AM (#37819870)
I've never really used barrel files, I don't see why they are unavoidable
Re:Speeding up the JavaScript ecosystem – The barrel file de... by c-hendricks on Monday October 09, 2023 @10:22AM (#37820727)
After years of writing JS/TS apps, barrel files are absolutely avoidable. You just write your functions / classes / variables, and import them wherever needed. No intermediary step of re-exporting them is needed.