Hi folks!
Had a question I was hoping someone would know the answer to. I am trying to use separate target libraries in order to keep my slices organized. Not all slices will be used on every page so I am scoping certain slices into folders by page. The issue I am running into is that the Slice Simulator cannot find any slices outside the "slices" directory by default. If I change the code to point towards my "HomeSlices" directory like this:
import { SliceSimulator } from "@prismicio/slice-simulator-react";
import { SliceZone } from "@prismicio/react";
import state from "../.slicemachine/libraries-state.json";
import { components } from "../HomeSlices";
const SliceSimulatorPage = () => (
<SliceSimulator
sliceZone={(props) => <SliceZone {...props} components={components} />}
state={state}
/>
);
export default SliceSimulatorPage;
then the simulator will be unable to preview any slices in the default "Slices" directory. Could be that I am missing something fairly obvious here but I cannot find a ton of documentation on how to use the different target libraries other than initial setup so figured i'd just ask.