Slice templates with slicemachine 1.0.0


I used to have a .prismic/slice-template/index.tsx file which was used to generate a slice index.tsx file.
How can I get this feature with the news slicemachine 1.0.0 since it does not seem to work anymore ?

Hey @jeanbaptiste.cazaux, we understand that some things are quite different with this new version, we're considering all feedback to new ways of approaching this. In the meantime, we've made significant updates to the original template, incorporating best practices to improve its functionality. We highly recommend using the updated template now, as we believe it will enhance your experience.

Thank you for your comments

It was a usefull feature since we :

  • do name the props "Props" in every react component
  • import a css module file in the slice
  • import types from "types.generated.ts" file produced by "prismic-ts-codegen" tool (which prevent this bug )
  • are using a different name for the data attributes tested by cypress (but OK your data attributes names are better than those we were using)