Nuxt's module reload doesn't work because of discrepancies between the DOM and Virtual DOM.
The issue seems related to comments somehow:
I tried these configs to get Nuxt to not extract or remove comments and just leave them as is:
terser: false,
html:{
minify: {
collapseBooleanAttributes: false,
decodeEntities: false,
minifyCSS: false,
minifyJS: false,
processConditionalComments: false,
removeEmptyAttributes: false,
removeRedundantAttributes: false,
trimCustomFragments: false,
useShortDoctype: false,
html5: false,
removeComments: false,
}
},