How to make ignores
work?
#2015
Unanswered
davestewart
asked this question in
Q&A
Replies: 1 comment
-
For anyone following in my footsteps, I got to the bottom of it, created an issue (#2017) and a PR (#2022). 🤞 it's OK and gets merged! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I've been trying to make
ignores
work properly, but I don't understand the intended usage.The docs suggest you can ignore words:
The module options restrict you to strings but the module code suggests that you can pass a RegExp:
https://github.com/nuxt/content/blob/main/src/module.ts#L646-L661
And if you pass a string, the RegExp effectively limits you to matching the start of key segments, which suggests folders prefixes only.
This makes sense in the terms of the supplied defaults:
But it doesn't really seem to provide a particularly intuitive way to programatically ignore items.
Would you consider modifying the defaults so the internal code could be simplified to something like this:
Also of note; ignores doesn't have any effect on the storage instance at the bottom of
src/module.ts
. Saving ignored files still triggers sockets andrefreshNuxtData()
Thanks,
Dave
Beta Was this translation helpful? Give feedback.
All reactions