davestewart / nuxt-content-assets

Enable locally-located assets in Nuxt Content
https://npmjs.com/package/nuxt-content-assets
107 stars 7 forks source link

This module seems to break custom transformers #81

Open connelhooley opened 1 month ago

connelhooley commented 1 month ago

Description

Once I add this module to my project, my custom transformers stop working.

To reproduce:

I've created a stackblitz: https://stackblitz.com/edit/github-izuj4b?file=nuxt.config.ts

Commenting out the reference to this module results in the /example route to start working again. The /example route is sourced by a custom transformer (./my-transformer.js), as documented here: https://content.nuxt.com/recipes/transformers

Expected result:

Context

I'm only using custom transformers, as I want different rehype/remark plugins to apply to certain files.

Environment info

Run the code below and replace with the output:

This is from the stack blitz env:

node -v
v18.20.3

npm list nuxt @nuxt/content nuxt-content-assets --depth=0
github-izuj4b@ /home/projects/github-izuj4b
+-- @nuxt/content@2.12.1
+-- nuxt-content-assets@1.4.4
`-- nuxt@3.11.2
davestewart commented 1 month ago

Hey,

Thanks for the issue! And even more thanks for the reproduction 🙏

I actually did not know about custom transformers, so let me look into this.