So for my validated method, I’m using something like this (obviously simplified):
updateDoc: new ValidatedMethod({
name: 'DocMethods.updateDoc',
action: 'Update this Document',
mixins: [CallPromiseMixin],
validate: new SimpleSchema({
// mySchema
}).validator({ clean: true }),
applyOptions: {
noRetry: true,
},
run({ }) {
if (!this.isSimulation) {
import DocFunctions from '/server/functions/docs';
return DocFunctions.updateDoc();
}
},
}),
I’ve been using server-side globals and referencing them in my validated methods, but I’d like to move to export/import. Just wanted to confirm that imports wrapped in the if (this.isSimulation)
block wouldn’t be pulled into the client bundle.
Thanks in advance!