Create a `slice` component that automatically maps components to slices
jamespegg opened this issue · comments
James Pegg commented
I've got into the pattern of using a slice
component which maps Prismic slices to Vue/Nuxt components. I was thinking of getting Nuxt.js to automatically load in components from a slices
folder and make them available through a built-on slice
component.
Hugo Villain commented
A team at Prismic is working on this. See this package for more information: https://github.com/prismicio/sm-commons/tree/master/packages/vue-slicezone
It's not documented yet but:
- it can map slices based on folders and packages you define in a config file
- it pre-writes the slice path resolver via a Nuxt module
- it works with named slots
You can follow the development there, I'm planning to write a README in the coming days