Optimise amount of initial CSS

This commit is contained in:
Jake Archibald
2020-11-26 15:40:36 +00:00
parent 4c03ceee04
commit 903c8b5d02
39 changed files with 29 additions and 26 deletions

View File

@@ -41,6 +41,7 @@ const assetRe = new RegExp('/fake/path/to/asset/([^/]+)/', 'g');
const appendCssModule = '\0appendCss';
const appendCssSource = `
export default function appendCss(css) {
if (__PRERENDER__) return;
const style = document.createElement('style');
style.textContent = css;
document.head.append(style);