Closed HoldYourWaffle closed 3 years ago
Could definitely be generated, but IMO I think it's a bit overkill since its really quick to make the change yourself and gives you better context on what's going on in the background. Also could present additional edge cases based on how user's initialize their own schemas.
Great title-gore material this one. I guess that's what I get for exploring new modules at midnight...
The README tells me that I have to modify my model file to add some imports after the initial generator run. Based on the example in the README, this is necessary for "2" things:
It seems to me that this last line (and the following export) can just as easily be generated and put in an output file, saving the chicken-and-egg dance for the simple cases.
Disclaimer: I only just discovered this module and am quite new to mongoose, so there's a good chance that this is a very silly suggestion...