How can I add the onerror="console.log('something')" attribute in Nuxt 2 to my <link> tags?

48 Views Asked by At

I'm trying to track that my css files didn't load. To do this, I want to add an onerror attribute on the tag that contains my styles. Is it possible to do this in Nuxt and how?

I use the extractCSS option in the nuxt.config.js, but the mini-css-extract-plugin documentation says that "It's only applied to dynamically loaded css chunks, if you want to modify link attributes inside html file, please using html-webpack-plugin", but my css file is not dynamically included, so I assume I need to do it somehow else.

0

There are 0 best solutions below