Lazy eval of files under /imports means they will not be bundled/sent to client or server unless they are imported explicitly?

Is it necessary to put files that I only want to be available (visible, for security reasons) on the server under /imports/server or they can be directly under /imports?

Files are only bundled if imported and client/server bundles are separate so no, it’s not necessary but it does provide more clarity at a glance

Also, my understanding is that if you have a file imports/server/foo.js then you can not import foo.js into the client at all, so I guess it does provide a bit more “security”. From the Meteor Guide:

Meteor ensures that any file in any directory named server/ will only be available on the server, and likewise for files in any directory named client/. This also precludes trying to import a file to be used on the server from any directory named client/ even if it is nested in an imports/ directory and vice versa for importing client files from server/.

1 Like

Yeah, I have seen this bit, but was not sure about the meaning. Thanks a lot for your interpretation.