arashsheyda / nuxt-mongoose

A Nuxt module for simplifying the use of Mongoose in your project.
https://docs.arashsheyda.me/nuxt-mongoose
69 stars 11 forks source link

Circular dependency warning when building for Prod. #17

Closed aezur closed 9 months ago

aezur commented 10 months ago

When you run npm run build, Vite warns about circular dependencies.

Export "defineMongooseModel" of module "node_modules/nuxt-mongoose/dist/runtime/server/services/mongoose.mjs" was reexported through module "node_modules/nuxt-mongoose/dist/runtime/server/services/index.mjs" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.