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 -
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.
Most helpful comment
I think you should quote it with
"http-equiv"
or'http-equiv'
.