So I’m using Meteor 1.3 with React and React-Router and I’m following the guidelines and all this by explicitly importing everything on an as-needed basis, including my node packages obviously. Though at times it can feel redundant and thereby the opposite of DRY coding, I have gone out of my way to enforce it on my team because the premise of explicit imports, aka code splitting, makes beautiful sense to me. Today, much to my surprise and somewhat horror, I looked over code that someone on our team wrote where he is defining a component and using velocity, velocity-animate and jquery without importing anything at all – much to my chagrin, it works without even a distant sign of error, assumably because I’m importing those packages elsewhere (to other components).
1. Is there a way to actually code split and make all of these separate import statements worth my time?
2. Whose fault is this? Is it a general Meteor thing, is it react or react-router, etc.?
3. Am I right to assume that basically in my current app (and assumably all other Meteor 1.3 apps), imported node modules are added to some sort of global list and subsequent front-end imports are essentially redundant?
4. Assuming there isn’t a way to modify Meteor (or react/react-router) to “genuinely” code split, would I be all-the-wiser to essentially not repeat all of my imports for my front-end packages and import them once to let’s say ‘/imports/startup/client/index’ (I am using Meteor’s suggested application structure fyi)
Sorry for the length slash I’m the first to admit that maybe I’m missing something basic here…