Yep, we are using lodash straight from npm in our app.
K, Iāll try it out later, so far Iām still working on trouble with FindFromPublication after the upgrade.
OMG I thought I was the only one. This has been so frustrating for me.
I have done a few quick prototypes with Meteor prior to 1.3 and loved that the load order was taken care of for me, because I havenāt used modules and explicit import/export notations before (apart from the very occasional import on small Node apps I experimented with before, but nothing large enough that it needed any complicated structuring).
Now, I can definitely see the benefit of the whole concept and also the single-point-of-entry makes total sense in terms of scalability.
But I am trying to build my first bigger app (ābiggerā meaning a more complex structure and feature set etc), and with every little bit of functionality I am doing my utmost to read the guide first, regarding structuring the folders and files etc⦠I keep getting confused by which file is importing which other file from where and why. And when something doesnāt work, I find out some file isnāt actually being called at all or imported into the wrong āparentā fileā¦
So as a beginner developer, who got into Meteor for the simplicity and ease of entry, I have to say Meteor 1.3 is a huuuge challenge.
So after reading this thread (thanks to everyone for their very helpful explanations, much appreciated!), I decided to redesign the folder structure on paper with a flow chart as to where each import comes from and where each export goes to etc.
Hopefully thatāll restore my sanity eventually.
@reel i think it make sense and the code is much cleaner since you donāt have to type all the imports again and again⦠Thanks for sharing⦠iāll be using this on my next project
One drawback is if you want to use webpack, you will have some problems with relative path /ā¦
I completely agree. I started doing the tutorials right before 1.3 dropped (wasnāt aware it was coming). It was so fun, and easy! Then I came back a week later to finish the tutorial. Everything changed.
I felt like an Italian mobster, āmy imports got imports got imports got importsā. Most of the time my code was right but an import was missing in the chain. I do understand where their going, but the learning curve went from x to x^2.
Iām going to give it another try in the coming weeks.
It didnāt become clear until my app started to grow, but I now see the example is a good pattern. All of the comments by hwillson above are right on the money.
Just wanted to say that I actually had to reach this thread in order to even be aware of the import chain that this pattern aims at. The whole server/main and register-api thing are not mentioned in the app structure guide. Could have saved me a lot of time to see it there.
Please file an issue!
@skirunman Iām having a strange intermittent error. At times _ refers to underscore and other times _ lodash. Have you seen this error? It is not very consistent. Often times if I >meteor npm remove lodash, and the install again, it will revert _ to underscore.
I love it ⦠brilliant. Best gem in the thread