0👍
I had the same problem before I added the following snippet in my nuxt.config.js
under build:
build: {
html: { minify: { collapseBooleanAttributes: true, decodeEntities: true, minifyCSS: false, minifyJS: false, processConditionalComments: true, removeEmptyAttributes: true, removeRedundantAttributes: true, trimCustomFragments: true, useShortDoctype: true } }
}
It seems to do the trick and nuxt generates routes/htmls a lot faster now.
Source:stackexchange.com