I have a file called routes.js that I am trying to import from both the client and the server. It contains shared imports, as well as some client and server specific ones:
import './shared'
if (Meteor.isServer) {
import './server1'
import './server2'
}
Now using the bundle-visualizer package I am able to see that the imports under Meteor.isServer are included in the client-side bundle. Is this the expected behavior? I also tried using require under the isServer block, but it made no difference.
Edit: From another thread, for anyone else searching: