Work in Development but Not Found in Production

My nuxt and prismic config

My development

My production

pages/blog/index.vue

Solved by adding this

But is that different with '@/plugins/link-resolver'?

Hi @wahabiputra,

Thanks for posting this question! This is a little strange. There are two different ways to add a Link Resolver.

  1. If your project does not use the nuxt/prismic module, we recommend registering your Link Resolver as a plugin in the plugins directory: @/plugins/link-resolver.js.
  2. If your project does use the module, you can put your Link Resolver in the app directory — @/app/prismic/link-resolver.js — and the Slice Machine plugin will register it automatically.

However, you've done it differently. So, I'm surprised that this works for you. You could try moving it from @/prismic/link-resolver.js to @/app/prismic/link-resolver.js (more instructions here), and see if it still works. If so, that could prevent errors in the future. If it doesn't work, let me know and I'll look into it.

Best,
Sam

Yeah, I just realized it too from my build log that looks like I misplaced it

Move that to @/app/prismic/link-resolver.js and now everything still seems fine

One of the reasons I don't use @/app/prismic is because it's seems odd to me, while @/prismic makes more sense

@wahabiputra That's great to hear that it's working!

Thanks for the feedback about the app/ directory. I'll pass it along to the product team :slight_smile:

1 Like

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