Hello Vincent,
Since version 0.6.0
, the libraries-state.json
is not generated anymore, so it shouldn’t be referenced anywhere. I noticed that the Nuxt.js tutorial still references it: Set up Prismic in a Nuxt Project - Documentation - Prismic; that’s why you encountered the issue. I have asked my documentation team to update this.
So there are two changes needed:
- This line should be removed:
import state from '~~/.slicemachine/libraries-state.json'
- This one
return { state, components }
replaced byreturn { state: {}, components }
So your slice-simulator.vue
file should look like:
<template>
<SliceSimulator v-slot="{ slices }" :state="state">
<SliceZone :slices="slices" :components="components" />
</SliceSimulator>
</template>
<script>
import { SliceSimulator } from '@prismicio/slice-simulator-vue'
import { components } from '~/slices'
export default {
components: {
SliceSimulator
},
data () {
return { state : {}, components }
}
}
</script>
Give this a try, and let me know if you need further assistance.
Thanks,
Priyanka