harlan-zw / nuxt-site-config

Unifying site config with powerful and flexible APIs, for module authors and users.
https://nuxtseo.com/site-config
MIT License
65 stars 6 forks source link

`useSiteConfig` on server warn me #24

Open Barbapapazes opened 9 months ago

Barbapapazes commented 9 months ago

Describe the bug

Hello,

I'm using the useSiteConfig composable on the server side but I've got this warning.

See the warning: https://github.com/unjs/website/actions/runs/7758397680/job/21160087678#step:6:231 See the file: https://github.com/unjs/website/blob/main/server/routes/rss.xml.ts

Details ``` [5:01:44 PM] WARN Export "useSiteConfig" of module "node_modules/nuxt-site-config/dist/runtime/nitro/composables/useSiteConfig.mjs" was reexported through module "node_modules/nuxt-site-config/dist/runtime/nitro/composables/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. Either change the import in "server/routes/blog/rss.xml.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. ```

Reproduction

https://github.com/unjs/website/blob/main/server/routes/rss.xml.ts

System / Nuxt Info

No response

harlan-zw commented 9 months ago

Thanks, I believe there is an upstream bug related to this occurring when mixing literals/alias imports for composable :thinking: