We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ab5084 commit 9f4609dCopy full SHA for 9f4609d
.gitignore
@@ -7,3 +7,4 @@ node_modules
7
.DS_Store
8
coverage
9
dist
10
+.env
src/module.js
@@ -22,6 +22,15 @@ function install (moduleOptions) {
22
logger.warn('Options `endpoint` is required, disabling module...')
23
return
24
}
25
+ if (process.env.NUXT_PUBLIC_PRISMIC_ENVIRONMENT) {
26
+ options.endpoint = process.env.NUXT_PUBLIC_PRISMIC_ENVIRONMENT
27
+ try {
28
+ // eslint-disable-next-line no-new
29
+ new URL(options.endpoint)
30
+ } catch (error) {
31
+ options.endpoint = `https://${options.endpoint}.cdn.prismic.io/api/v2`
32
+ }
33
34
35
this.options.build.transpile.push('@prismicio/vue', '@prismicio/simulator')
36
0 commit comments