DEV Community

Discussion on: Why deps.ts and mod.ts is BAD in Deno

Collapse
 
ievolved profile image
Shawn Bullock • Edited

Sometimes it might make sense. If your project is a bunch of functions that may or may not be used, this totally makes sense. But if you're project is something like Oak, then a fair amount of it will be wanted, and maybe other parts will be added on, and those dependencies can be isolated if needed.

Or if your project is an enterprise app, like mine, then you most likely want most, if not all, of the dependencies.

Compile time isn't a big deal (to me). It's a one time thing for each new launch. And such a decision imposes architecture which may or may not be what I'm looking for.

The compromise I've made in my public Deno libraries is to allow each major feature to be independently loaded, but also have a mod.ts that loads them all if someone so chooses. I tend to choose it.

Collapse
 
wongjiahau profile image
WJH

Compile time isn't a big deal

It's might be true for backend, but for frontend development, a fast feedback loop is very crucial, especially most of frontend developer's time is spent on styling and layout rather than logic.