Nuxt.js: nuxt.config.js doesn't support http-equiv for meta

Created on 13 Mar 2017  路  3Comments  路  Source: nuxt/nuxt.js

Hi, I am trying to add some http-equiv while developing:

  head: {
    htmlAttrs: { prefix: 'og: http://ogp.me/ns#' },
    title: 'title',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { name: 'description', content: "some" },
      { name: 'msapplication-config', content: '/favicon/browserconfig.xml' },
      { name: 'theme-color', content: '#ffffff' },
      { http-equiv: 'cache-control', content: 'max-age=0' },
      { http-equiv: 'cache-control', content: 'no-cache' },
      { http-equiv: 'expires', content: '0' },
      { http-equiv: 'expires', content: 'Tue, 01 Jan 1980 1:00:00 GMT' },
      { http-equiv: 'pragma', content: 'no-cache' }
    ],
  }

it gives an error on npm run dev:

http-equiv: 'cache-control', content: 'max-age=0',
    ^
SyntaxError: Unexpected token -

This question is available on Nuxt.js community (#c326)

Most helpful comment

I think you should quote it with "http-equiv" or 'http-equiv'.

All 3 comments

I think you should quote it with "http-equiv" or 'http-equiv'.

@marcenuc my bad, I definitely should have tried that before asking.
Thank you, setting http-equiv in quotes works

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pehbehbeh picture pehbehbeh  路  3Comments

surmon-china picture surmon-china  路  3Comments

jaredreich picture jaredreich  路  3Comments

uptownhr picture uptownhr  路  3Comments

ghost picture ghost  路  3Comments