Unit testing Slices with Next JS, Vitest & JSX

Hi!

You can already configure your Next adapter to create slice with the ````jsx extension :slightly_smiling_face:

You need to update your `slicemachine.config.json with:

  "adapter": {
    "resolve": "@slicemachine/adapter-next",
    "options": {
      "jsxExtension": true
    }
  },

Documentation: @slicemachine/adapter-next Technical Reference - Documentation - Prismic

Let us know if it solves your problem.
Xavier

1 Like