Skip to content

Releases: nuxt-modules/sanity

v1.3.1

11 Oct 22:48
9148111
Compare
Choose a tag to compare

1.3.1 (2022-10-11)

Bug Fixes

  • transpile nitro auto-imports (d77b5df)

v1.3.0

23 Sep 11:30
52db66e
Compare
Choose a tag to compare

1.3.0 (2022-09-23)

Features

  • enable groq, useSanity and createSanityClient in server routes (#510) (fdf8353)

Bug Fixes

  • use fresh client independent of isomorphic fetch (#509) (52f0bd3)

v1.2.3

22 Jun 22:45
65c5d2c
Compare
Choose a tag to compare

1.2.3 (2022-06-22)

Bug Fixes

  • render element children directly (2162f7e), closes #422

v1.2.2

30 May 15:03
90e5904
Compare
Choose a tag to compare

1.2.2 (2022-05-30)

Performance Improvements

  • use $fetch for minimal client (7b7517e)

v1.2.1

17 May 22:10
b919cbe
Compare
Choose a tag to compare

1.2.1 (2022-05-17)

Bug Fixes

  • include both public + private runtime config (3a478ef)

v1.2.0

20 Apr 23:47
Compare
Choose a tag to compare

1.2.0 (2022-04-20)

v1.1.2

15 Apr 21:30
Compare
Choose a tag to compare

1.1.2 (2022-04-15)

v1.1.1

20 Feb 22:01
Compare
Choose a tag to compare

1.1.1 (2022-02-20)

Bug Fixes

  • don't overwrite provided options (e0263e6)

v1.1.0

20 Feb 17:13
Compare
Choose a tag to compare

1.1.0 (2022-02-20)

⚠ BREAKING CHANGES

  • If you were relying on the auto-disabling part of this module

Bug Fixes

  • add sanity options from runtimeconfig to module defaults (#319) (a167ef2)
  • don't disable module if no projectId is specified (8a5b918)
  • render children of custom components (44bfcab)
  • rework nested list handling (0b18069), closes #266

v1.0.0

17 Feb 12:48
Compare
Choose a tag to compare

1.0.0 (2022-02-17)

Features

  • migrate module to support nuxt3 and bridge (#316) (2ec11d6)

πŸ‘‰ Migration

v1 of @nuxtjs/sanity requires either Nuxt Bridge or Nuxt 3. (If you are using Nuxt 2 without Bridge, you should continue to use v0.10.)

  1. The main change between Nuxt 2 -> Nuxt 3 is that there is no longer a globally available $sanity helper. If you want to keep the current behaviour, just enable the globalHelper option:

      import { defineNuxtConfig } from 'nuxt3'
    
      export default defineNuxtConfig({
        modules: ['@nuxtjs/sanity']
        sanity: {
    +     globalHelper: true
        }
      })
  2. Instead of adding @nuxtjs/sanity/module you will add @nuxtjs/sanity in your nuxt.config

      import { defineNuxtConfig } from 'nuxt3'
    
      export default defineNuxtConfig({
    -   modules: ['@nuxtjs/sanity/module']
    +   modules: ['@nuxtjs/sanity']
      })
  3. You should no longer import helpers like groq directly from @nuxtjs/sanity. These will be available automatically throughout your app using the Nuxt auto-imports feature. If you do need to import them directly you can do so by importing from #imports.

      import { groq, useSanity, useSanityQuery } from '#imports'
  4. If you are using <SanityContent> this now no longer renders a wrapper container. If you need the wrapper, you can add it yourself.

      <template>
    -   <SanityContent :blocks="blocks" />
    +   <div>
    +     <SanityContent :blocks="blocks" />
    +   </div>
      </template>