does not ignore Query
adardesign opened this issue · comments
I have a structure like this:
src/
...
_template
allProducts.js
...
In the gatsby-config.js I have the following (as the first plugin)
{
resolve: 'gatsby-plugin-exclude',
options: { paths: ['/_templates/*', '/_templates/**', '/_pages/*'] },
},
Now In the there is a Query, which is irrelevant (temporarily) how can I get gatsby to ignore reading this file or directory.. I am still getting errors
gatsby-plugin-exclude
excludes output destinations (paths) from output, not files themselves
this plugin doesn't interact with the GraphQL layer of Gatsby, but rather the output layer.
are you using gatsby-source-filesystem
?
since gatsby-source-filesystem
has an ignore
option, which might be what you're after
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data/`,
ignore: [`**/\.*`], // ignore files starting with a dot
},
},
Thanks
…On Sun, Feb 9, 2020 at 1:06 AM Harry Park ***@***.***> wrote:
gatsby-plugin-exclude excludes output destinations (paths) from output,
not files themselves
this plugin doesn't interact with the GraphQL layer of Gatsby, but rather
the output layer.
------------------------------
are you using gatsby-source-filesystem
<https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-filesystem>
?
since gatsby-source-filesystem has an ignore option, which might be what
you're after
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data/`,
ignore: [`**/\.*`], // ignore files starting with a dot
},
},
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAAFX55RPZEH4UF57JU244TRB6MP5A5CNFSM4KR7MQOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGDMMI#issuecomment-583808561>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFX5ZVNF7Y5Y4CMUMNMRLRB6MP5ANCNFSM4KR7MQOA>
.
--
Eliazer Braun