Skip to content

Commit

Permalink
fix: opt in to import.meta.* properties (#208)
Browse files Browse the repository at this point in the history
* fix: opt in to `import.meta.*` properties

* chore: update compat

---------

Co-authored-by: lihbr <lihbr@users.noreply.github.com>
  • Loading branch information
danielroe and lihbr authored Mar 25, 2024
1 parent 4ce471f commit fee3cbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineNuxtModule<PrismicModuleOptions>({
meta: {
name: '@nuxtjs/prismic',
configKey: 'prismic',
compatibility: { nuxt: '^3.0.0' }
compatibility: { nuxt: '^3.7.0' }
},
defaults: nuxt => ({
endpoint: '',
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineNuxtPlugin((nuxtApp) => {
const previewCookie = useCookie('io.prismic.preview').value

// Update client with req when running server side
if (process.server) {
if (import.meta.server) {
prismicPlugin.client.enableAutoPreviewsFromReq(useRequestEvent()?.req)
}

Expand Down

0 comments on commit fee3cbe

Please sign in to comment.