nuxt-modules / prismic

Easily connect your Nuxt.js application to your content hosted on Prismic

Home Page:https://prismic.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a `slice` component that automatically maps components to slices

jamespegg opened this issue · comments

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.

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