You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering when and under which circumstances the hooks content:file:beforeParse and content:file:afterParse are being called. I had a quick look into the source code of nuxt/content and it seems that they are being called before and after parseContent(...) in src/runtime/server/storage.ts, which is being called only in development-mode and if the content hasn't been already parsed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am wondering when and under which circumstances the hooks content:file:beforeParse and content:file:afterParse are being called. I had a quick look into the source code of
nuxt/content
and it seems that they are being called before and afterparseContent(...)
insrc/runtime/server/storage.ts
, which is being called only in development-mode and if the content hasn't been already parsed.Maybe the following example helps to understand what I mean: https://stackblitz.com/edit/github-9zmuxl?file=server/plugins/content.ts
In this example I'm expecting to see the console.log after every every reload.
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions