Static GitHub Issues

[1117] hyphen in script causes error

prev: how to use babel-polyfill for entry
next: Nuxt-view with nuxt-link

I'm using Nuxt with Snipcart. Snipcart requires you to include their script tag in the head. I receive an error as a result of the "-" in data-api-key. If I remove the hyphens, then I can compile fine.

`Syntax Error: Unexpected token, expected , (45:85)

43 | head: { 44 | script: [

45 | { src: 'https://cdn.snipcart.com/scripts/2.0/snipcart.js', id: 'snipcart', data-api-key: 'APIKey' } | ^ 46 | ] 47 | }, 48 | layout: 'default',`

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c979">#c979</a>)</em></sub></div>