davestewart / nuxt-content-assets

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

This module seems to break custom transformers #81

Open connelhooley opened 5 months ago

connelhooley commented 5 months 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 5 months 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.