Disable Slice Simulator and Live Preview for slices in CMS?

Hello,
As per title, I'm not really using this feature and I wish to disable it. How to do it?

I removed slice simulator page from my project (next.js 14) but when I remove the URL from live preview setting in Prismic the slices on the left are just erroring out.

Hey team. it's not possible to disable them once they have been activated. This has been noted as a feature request and is being tracked by the product team for future improvements.

1 Like

Ok thanks,

But there is a problem, I updated slice machine to latest and slice simulator broke and my site won't deploy. How to fix this? I'm not willing to upgrade to Next.js 15 yet due to instability of that version (and packages breaking) but I want to benefit from slice-machine bug fixes.

import {SliceSimulator, SliceSimulatorParams, getSlices} from '@slicemachine/adapter-next/simulator';
import {SliceZone} from '@prismicio/react';
import {components} from '@/slices';

export default function SliceSimulatorPage({searchParams}: SliceSimulatorParams) {
    const slices = getSlices(searchParams.state);

    return (
        <SliceSimulator>
            <SliceZone slices={slices} components={components}/>
        </SliceSimulator>
    );
}

It says state is undefined in searchParams

Ah, it returns a promise now, all right this fixed it:

import {SliceSimulator, SliceSimulatorParams, getSlices} from '@slicemachine/adapter-next/simulator';
import {SliceZone} from '@prismicio/react';
import {components} from '@/slices';

export default async function SliceSimulatorPage({searchParams}: SliceSimulatorParams) {
    const slices = getSlices((await searchParams).state);

    return (
        <SliceSimulator>
            <SliceZone slices={slices} components={components}/>
        </SliceSimulator>
    );
}

This, or the ability to show the slice screenshot instead of the word "Error", would be really useful. It's not great handing the CMS over to other team members and having to tell them to ignore the word error printed multiple times down the sidebar :grimacing:

1 Like

Hi Brad,

Welcome to the community :slight_smile:

We understand the importance of having control over the Slice Simulator and Live Preview features within the CMS. Our product team recognizes this need and is actively planning to work on a solution to allow users to disable these features when they are not required; there's no ETA for this, though.

We appreciate your patience and will keep you updated on our progress.