arashsheyda / nuxt-mongoose

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

Circular dependency warning when building for Prod. #17

Closed aezur closed 1 year ago

aezur commented 1 year 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.