Skip to content

Commit

Permalink
feat: remove duplicated css connections with inlined styles in render…
Browse files Browse the repository at this point in the history
…ed html
  • Loading branch information
EvgenyWas committed Jul 15, 2024
1 parent 1c6a324 commit 96cee1d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,16 @@ export default defineNuxtConfig({
imports: {
dirs: ['./composables', './composables/api', './utils'],
},
hooks: {
'build:manifest': (manifest) => {
// solve this issue with blocking stylesheets in rendered HTML with inline styles https://github.com/nuxt/nuxt/issues/21821
for (const item of Object.values(manifest)) {
// find the manifest item with css reference
if (item.css) {
// clear all references to exclude from the rendered HTML links
item.css = [];
}
}
},
},
});

0 comments on commit 96cee1d

Please sign in to comment.