according to the guide, i shouldn’t expect anything under /imports to be eagerly loaded.
but i just dropped a CSS file in there and/ without importing it, the app picked up the styles.
is this expected? what is best practice? rely on eager loading or import it? if the latter, what’s the best way to import it?
If you keep reading it seems to be saying it does that for backwards compatibility, correct?
Even though it is recommended that you write your application to use ES2015 modules and the imports/ directory, Meteor 1.3 continues to support eager loading of files, using these default load order rules, to provide backwards compatibility with applications written for Meteor 1.2 and earlier. You may combine both eager loading and lazy loading using import in a single app.
See Default file load order
thanks for the link. if you keep reading further down, under Special Directories:
Any directory named imports/ is not loaded anywhere and files must be imported using import.
my experience has been that any JS in /imports is not eagerly loaded. so i was surprised that the CSS was.
hum, maybe report it as a bug?