Making Slice Machine work with Remix

I've had a lot of success getting prismic up and running with remix. I would love to use slice machine with it.

I've configured the remix equivalent for the slice machine simulator.

When running slice machine it says that "react.js is not supported". I assume this is because I've not got the next or nuxt packages installed.

I've taken a look at the packages around slice machine to try to understand how I could go about making this integration work. However, I lack the knowledge of how I would need to interact with slice-machine to make this work. Do you have any diagrams / documentation about what I would need to do to PR this feature?

Hello @benembery, thanks for reaching out.
Slice Machine only works with Nuxt and Next, for the moment.
But we have plans to revamp it so that it's framework agnostic.
We post all of our feature updates in the progress page:

Thanks, is there a timeline for the revamp? I would really like to help unlock this for other developers and myself.

What I'm struggling to understand it how the interaction works between the slice simulator page and slice machine. I'd happily try to reverse engineer it from there :slight_smile:

One of my colleagues suggests that if you install next.js you can get around the check and still work with Slice Machine.

This blog post was written in October 2022: Remix Tutorial: Building a Website with a Headless CMS

Trying it now, and getting the error: '@slicemachine/adapter-universal@latest' is not in this registry.

It appears there was some support for Remix, but not anymore.

I have this working but needed to install the nextjs adapter.

Slice machine will continue to generate an index file in the slices directory with he next dynamic imports, you have to create a different way of importing or it will get overwritten.

1 Like