https://github.com/hecktarzuli/vue-meta-generate-bug
Clone repo
do a 'yarn generate'
View the home page source, notice the meta description still has the < > in the field.
Do a yarn build
yarn start
View the home page source, notice the meta description is properly encoded.
That fields are encoded the same using generate or build.
Only 'build' encodes them.
It's because of the HTML minifier options. You can fix it with
html: {
minify: {
collapseBooleanAttributes: true,
decodeEntities: false, // <----------- Disable this option, Nuxt enables it by default
minifyCSS: true,
minifyJS: true,
processConditionalComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
trimCustomFragments: true,
useShortDoctype: true
}
},
@matteo-rigon I will give that a try, thank you!
That works as advertised, thanks!
Most helpful comment
It's because of the HTML minifier options. You can fix it with