Hyphens in the path using Nuxt Prismic Route Resolver

I have a route resolver defined in my nuxt.config.js as follows:

  modules: [
    [
      "@nuxtjs/prismic", {
        "endpoint": "https://ventur.cdn.prismic.io/api/v2",
        "apiOptions": {
          "routes": [
            {
              "type": "page",
              "path": "/:uid"
            },
            {
              "type": "case_study",
              "path": "/the-experience/:uid"
            }
          ]
        }
      }
    ],
  ]

This is my folder structure:

Screenshot 2020-11-16 at 09.55.22

However, when rendered, the hyphen seems to be breaking my URL. Does anyone else have this issue? Is there a workaround?

I'm using:

  • "@nuxtjs/prismic": "^1.2.4",
  • "@prismicio/vue": "^2.0.7"
1 Like

Hello Sel,

Thanks for posting to us. I've checked this subject with my repository and project, I can not reproduce this issue. I'd be happy to troubleshoot this. For this, can you please send me the github repo and the url of your repository? If you do not want to send it publicly, you can send me a private message.

Thanks,
Priyanka

@sel I have checked your repository cluster, and It's in the old cluster. You need SliceMachine activated on your repository for this to work.

Very odd, I thought we'd been building with Slices the whole time. We are using the Prismic Nuxt starter

Hey Sel,

Slices themselves are something that exists outside of Slicemachine, also the current Prismic Nuxt starters don't use Slicemachine (we plan to change that very soon).

Slicemachine is a tool for developing and managing Components/Slices and has some extra features like the route resolver, but this project is in BETA. It can be activated on older repositories and/or set-up automatically using the Prismic CLI.

Ah, ok. Please could SliceMachine be activated on the ventur instance?

Sure, your repository is being transferred to SliceMachine cluster.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.