3 ms·
Are you using something like esm.sh, or does bazel download external packages and bundle them for you? Or via some other means?
by davidmurdoch 2y ago
Are you using something like esm.sh, or does bazel download external packages and bundle them for you? Or via some other means?
- mattlondon 2y agoBazel is a build tool, not a dependency management tool. There are no dynamic imports or downloads. You build from source. Dependencies are merged into our monorepo very sparingly - angular is "batteries included" so you don't need to import hundreds of thousands of extra dependencies and transient-dependencies to build a functional site like you need to do with other frameworks. Left-pad issues simply do not happen this way.
- davidmurdoch 2y agoThe way many talk about it made me believe it is essentially an "everything" tool, and if it can't do something it's probably possible to extend it to do it. And from what I've read (I haven't used it myself) Bazel has some internal and external dependency management built in. And there are many JS related build rules for Bazel (https://bazel.build/docs/bazel-and-javascript https://bazel.build/docs/bazel-and-javascript), and at least one of these looks like it would enable npm. > Dependencies are merged into our monorepo very sparingly Oh that must be nice. The project I'm working on (a browser extension) currently has 4083 dependencies (including dev dependencies).
- cxr 2y ago> Oh that must be nice. https://prodimage.images-bn.com/pimages/9781962572439_p0_v1_s600x595.jpg https://prodimage.images-bn.com/pimages/9781962572439_p0_v1_... Just because the canonical approach at your org (or anywhere) is to use the NPM style of late-fetching dependencies to do an end-run around Git, that doesn't mean that you, personally can't take advantage of Git's branching model and its support for multiple remotes for your own, local benefit.
- davidmurdoch 2y agoHahahaha If I cared to have personal projects that still involve sitting a computer. These days I just prefer to go outside.
- cxr 2y agoI wasn't talking about hobby projects. I was talking about your personal approach to your professional work.
- davidmurdoch 2y agoInteresting, I'm not sure what you have in mind. There are 4000+ dependencies, using yarn workspaces, many are patched by `yarn`, extensive code security checks, PRs from forks introduce additionally complexity for reviewers, and probably a host of other "problems". To be clear, the issue isn't npm/yarn, it's the sheer number of external dependencies that I loathe.