nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

module loads both `js` and `mjs` files in client #2512

Closed farnabaz closed 8 months ago

farnabaz commented 8 months ago

As of https://github.com/nuxt/content/commit/dff252b275228a3d9bef0309db6b741e07a6c7b9 the module loads both mjs and js files in client. This cause an issue in loading scoped data in files and create duplicate data.

Screenshot 2024-01-18 at 15 35 02

/cc @danielroe what do you think?

danielroe commented 8 months ago

Do you have a reproduction I can examine?

farnabaz commented 8 months ago

The reproduction is tricky, but you can see in this link that there is two different client-db https://farnabaz-alpine-18.nuxt.space/articles/new/?preview=d4bd4346217e7c8c6d5c253d921113f2

Reproducing it with nuxt studio in development mode is easy, but other than that is tricky. I've also checked with Content@2.9.0 and it works fine

danielroe commented 8 months ago

Any chance of a stackblitz or git repo? 🙏

(Or some steps.)