Module evaluated multiple times?
Unanswered
Argente Brun posted this in #help-forum
Argente BrunOP
Normally importing an module in multiple files should only evaluate it once.
I've noticed however that if I have a module
This happens both during dev and during the build step.
Should I expect it to only log once during the build step? Or are the other things going on that'd cause it to evaluate multiple times?
Gpt couldn't give a definitive answer on if that's expected at the build step.
I've noticed however that if I have a module
/src/lib/module.ts which includes a console.log() at the module root (not in an export), and that module is imported in many places throughout my app, the log prints multiple times. Not as many times as the module is imported, but still a handful.This happens both during dev and during the build step.
Should I expect it to only log once during the build step? Or are the other things going on that'd cause it to evaluate multiple times?
Gpt couldn't give a definitive answer on if that's expected at the build step.