How to use the @sanity/server.getDocumentElement function in @sanity/server

To help you get started, we’ve selected a few @sanity/server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / cli / src / commands / build / buildCommand.js View on Github external
.then(chunkMap => {
        spin.text = 'Building index document'
        return getDocumentElement(compilationConfig, {
          scripts: ['https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en', 'vendor.bundle.js', 'app.bundle.js'].map(asset => ({
            path: `js/${asset}`,
            hash: chunkMap[asset]
          }))
        })
      })
      .then(doc =>