content icon indicating copy to clipboard operation
content copied to clipboard

hook 'content:file:beforeParse' not working

Open editcue opened this issue 1 year ago • 2 comments

Environment

Nuxt 3.12.4 Nitro 2.9.7

Reproduction

use official project starter command npx nuxi@latest init content-app -t content and add a plugin into path:/server/plugins like this

export default defineNitroPlugin((nitroApp) => {
	console.log('nitroApp defineNitroPlugin')
	nitroApp.hooks.hook('content:file:beforeParse', (file) => {
		console.log('nitroApp content:file:beforeParse')
		if (file._id.endsWith('.md')) {
			file.body = file.body.replace(/react/g, 'vue')
		}
	})
})

Describe the bug

When nuxt version is 3.12.4,it did not run into console.log('nitroApp content:file:beforeParse') and print. When I down grade nuxt to 3.12.2. It work fine.

Additional context

No response

Logs

No response

editcue avatar Aug 05 '24 12:08 editcue

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 05 '24 02:10 github-actions[bot]

I experience the same problem using version 2.13.2

AloisSeckar avatar Oct 05 '24 17:10 AloisSeckar

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Dec 05 '24 02:12 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Jan 16 '25 15:01 github-actions[bot]