
Show HN: JavaScript Namespaces via a babel plugin - antjanus
https://github.com/AntJanus/babel-plugin-namespaces
======
hex13
Interesting.

I have also seen other solutions which address this problem:

1\. [https://github.com/facebook/fbjs](https://github.com/facebook/fbjs)
library that Facebook uses in React: you have @providesModule annotations in
modules, and you can write e.g. require('myModule') even if myModule.js is
somewhere deep in directory hierarchy.

2\. webpack configuration (e.g. you can write own loader to be able to make:
require('somethingWeird'), or probably use resolve like in this article:
[https://medium.com/@ericclemmons/dogfooding-your-open-
source...](https://medium.com/@ericclemmons/dogfooding-your-open-source-
projects-9e6dc1e7d1c8#.3cl7ayf27)

I mean, I don't want to underestimate your project by writing that something
similar existed. Quite the opposite. I think that you made library for solving
important problem (resolving dependencies in nice manageable way). I am just
agnostic about which solution is the best.

Although I hope that in future one solution will prevail (maybe yours, maybe
webpack based, maybe @providesModule, or maybe this kind of functionality
should belong to JavaScript language itself? Maybe ES8 or ES9 will have
something like this?).

Because dependency management is too important for allowing to further
fragmentation :)

