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

build: do not emit `.mjs` in runtime directory #2514

Closed danielroe closed 8 months ago

danielroe commented 8 months ago

🔗 Linked issue

resolves https://github.com/nuxt/content/issues/2512

❓ Type of change

📚 Description

We probably need to fix this in nuxt/module-builder, but adding the new entrypoint didn't overwrite existing one, so both .js and .mjs files were being created.

📝 Checklist

cloudflare-workers-and-pages[bot] commented 8 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f87d44c
Status: ✅  Deploy successful!
Preview URL: https://1c800e20.nuxt-content-1il.pages.dev
Branch Preview URL: https://build-mjs.nuxt-content-1il.pages.dev

View logs

farnabaz commented 8 months ago

Thanks @danielroe What about module file? Why not removing mjs and cjs and just create .js extension?

danielroe commented 8 months ago

I'd be very happy with that as well, but it shouldn't be linked to the bug and I wanted to keep the surface area of the change limited.