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

Allow configuring module at runtime using environment variables #184

Closed michael-bouvy closed 1 year ago

michael-bouvy commented 1 year ago

Allow configuring Nuxt Prismic module at runtime using environment variables, i.e. NUXT_PUBLIC_PRISMIC_ENDPOINT=my-repository-name.

⚠️ In src/module.ts line 156, endpoint is fetched from non-resolved config. Not sure about how to workaround this.

Types of changes

Description

Resolves: #183

Checklist:

lihbr commented 1 year ago

OK, I made some minor tweaks:

I tested the script injection part with a bit of everything (SSR/no SSR, dev, build, and generate), I think it should be good(?)

May I ask you to double-check/review changes on your end too? If everything's good I'm happy to merge and release today 🎉

michael-bouvy commented 1 year ago

Looks great to me, thanks @lihbr !

lihbr commented 1 year ago

Released as part of RC.3: https://github.com/nuxt-modules/prismic/blob/v3/CHANGELOG.md#300-rc3-2023-03-28

Thank you so much again for your contribution!