head method does not work with mode: spa
[issue link]In nuxt.config.js:
module.exports = {
mode: 'spa',
head: {
title: 'Generic title',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Generic description' }
]
}
/*
** other things
*/
}
In one of the pages (/pages/b.vue):
<script>
export default {
head () {
return {
title: 'Page B',
meta: [
{ hid: 'description', name: 'description', content: 'Page B description' }
]
}
}
}
</script>
Then “nuxt generate”
Go to /dist/b/index.html
Expect to see:
<meta data-n-head="true" content="Page B description" name="description" data-hid="description">
and
<title data-n-head="true">Page B</title>
but get:
<meta data-n-head="true" content="Generic description" name="description" data-hid="description">
and
<title data-n-head="true">Generic title</title>
Related to: https://nuxtjs.org/api/pages-head/