You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using mongoose together with Nuxt 3/nitro you often run into the issue that your models are tree-shaken out of your final build. Leading to 500 errors because a reference could not be found to this file.
works, but I think there has to be a cleaner solution. I'm proposing some kind of option file to allow for certain directories and/or files to be ignored from the tree-shaking logic.
Describe the feature
Hi,
When using mongoose together with Nuxt 3/nitro you often run into the issue that your models are tree-shaken out of your final build. Leading to 500 errors because a reference could not be found to this file.
Solving it like this:
works, but I think there has to be a cleaner solution. I'm proposing some kind of option file to allow for certain directories and/or files to be ignored from the tree-shaking logic.
Maybe like this:
Additional information
Yes, but someone would have to give me a starting point, as I'm not familair with the internals of nitro.
The text was updated successfully, but these errors were encountered: