nuxt-modules / prismic

Easily connect your Nuxt.js application to your content hosted on Prismic
https://prismic.nuxtjs.org
MIT License
245 stars 48 forks source link

[BUG](v3.0.0-rc.4) The module is not fully compatible with runtimeConfig #190

Closed LouisMazel closed 1 year ago

LouisMazel commented 1 year ago

Versions

Steps to reproduce

Set your nuxt.config.{js,ts} like this

export default defineNuxtConfig({
  modules: ['@nuxtjs/prismic'],
  runtimeConfig: {
    public: {
      primisc: {
        endpoint: 'YOUR_ENDPOINT'
      }
    },
  },
})

This is not working because the module only use the prismic config in the root property in nuxt.config.{js,ts}

What is Expected?

No need to set the primsic config in root nuxt.config.{js,ts} with the property prismic when it's always set in runtimeConfig.public.prismic

What is actually happening?

I have to set the config in nuxt.config.{js,ts} in root property prismic and in runtimeConfig.public.prismic

Pull Request

To fix it, I opened this Pull Request #189

lihbr commented 1 year ago

Fixed in #189, released in RC.5, thank you!