Broken with Prismic Changes
kingbiscit opened this issue · comments
It looks like Prismic have made some changes to the client:
[eleventy:default] [11ty] > client.getAll is not a function
[eleventy:default]
[eleventy:default] TypeError
was thrown:
[eleventy:default] [11ty] TypeError: client.getAll is not a function
Versions
- @11ty/eleventy: 1.0.0-canary.44
- eleventy-plugin-prismic: 0.1.2
- node: 14
Reproduction
npm update
You can see the change here:
prismicio/prismic-client@4efdfa0
This can easily be fixed by changing
const crawlAndSort = async (client, options = {}) => {
const docs = await client.dangerouslyGetAll();
But it might make more sense to make singletons mandatory and loop through that using getAllByType
Great catch! Let me fix that quick
TBH I don't want to make singletons mandatory as I prefer the plugin to remain as straightforward as possible to use in its most basic form. This is of course very open to discussion :)