-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularize next.js #349
Comments
A monorepo could make this not as painful as an org + multi-repos to keep in sync. |
A monorepo is exactly what locks one into the whole stack, which is what one should avoid. Edit: I didn't know what a monorepo is ;) check it out here: https://medium.com/@bebraw/the-case-for-monorepos-907c1361708a#.byyjao2hf |
What I call a monorepo is a single git repo with multiple packages in it. I don't see how this can lock you and make it unable to use a package or a fork for something specific. |
Ok I didn't know the term. Basically it's one repository containing many separate npm packages, which then get published to npm independently? Sounds interesting, I agree, such a setup might favor the right architectural choices. |
This sounds cool! Lerna can manage monorepo with multi packages. |
Let me add a list from my search in MoOx/phenomic#598 (comment)
some infos |
Big ➕ for this one I'm currently looking to use Would be nice if I could just import |
Thanks for your comments. I'm in complete agreement with you, and this is already our approach. Some general comments:
Finally, modularization for the sake of modularization is not useful. I think modularization is useful when it serves a mechanism for module substitution. In this case, modularizing webpack is important because then you can extend it and learn it independently. My goal is to provide a good foundation for stability in making high performant websites and web applications with a focus on lightweightness and flexibility. APIs like |
Oh by the way, I completely agree that |
Sounds awesome. In particular #291 is what does it for me. |
Hey guys, what you are doing is amazing, a lot of good architectural choices!
Coming from meteorland I'd like to contribute with a big lesson learned: buy-in is real and consequential. You have a framework that magically does everything for you, and then when you want to move on to the next better approach (and you will, because it's javascript-land) you have to give up on the good parts as well as the bad.
The next.js community has the opportunity to do this right, but there is already a somewhat bad sign: next.js has all the code in the main repository, and no other zeit dependency! I think it should be the opposite. next.js should only be wiring things together.
I'd suggest this approach: ask yourself - how would it be if there was no next.js repo but only partial modules, and I had to pick and wire everything together in the app directly? <- make this as easy as possible
I know you, like me, like the unix philosophy (do one thing and do it well), and from how I see it next.js does already too many. At the very least
Now you think "but these are all entangled together". Well, that's exactly the problem. That's what happened with meteor. My recommendation is that you start decoupling these things from each other early enough, or in a year people will face real problems when they want to replace one or more bits of the stack with something else.
The text was updated successfully, but these errors were encountered: