From 65723ff5b7797e6565f80734370aa4f1a05295f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naoki=20Tomita=F0=9F=90=B1?= Date: Wed, 8 Nov 2023 18:26:06 +0900 Subject: [PATCH] improve first load style --- app/docs/document.md | 3 +++ app/package.json | 4 ++-- app/pages/_document.tsx | 3 ++- app/yarn.lock | 16 ++++++++-------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/docs/document.md b/app/docs/document.md index 92b73de..83dd535 100644 --- a/app/docs/document.md +++ b/app/docs/document.md @@ -7,11 +7,14 @@ The default template is as follows. Props is empty object. Children are your page component will injected. ```tsx +import { h, SsrStyle } from "nzxt/h"; + const Document = (_: {}, children: Component[]) => { return ( + { /* if you want to use zstyl in ssr */} Document diff --git a/app/package.json b/app/package.json index 5402166..0198c29 100644 --- a/app/package.json +++ b/app/package.json @@ -7,9 +7,9 @@ "@types/marked": "^6.0.0", "@types/node": "^20.8.10", "marked": "^9.1.4", - "nzxt": "^0.3.11", + "nzxt": "^0.3.12", "zheleznaya": "^0.2.3", - "zstyl": "^0.2.1" + "zstyl": "^0.2.3" }, "scripts": { "build": "nzxt build", diff --git a/app/pages/_document.tsx b/app/pages/_document.tsx index 6e7e5a2..cb6efbd 100644 --- a/app/pages/_document.tsx +++ b/app/pages/_document.tsx @@ -1,4 +1,4 @@ -import { h, Component } from "nzxt/h"; +import { h, Component, SsrStyle } from "nzxt/h"; const Document: Component = (_, children) => { return ( @@ -11,6 +11,7 @@ const Document: Component = (_, children) => { + { /* if you want to use zstyl in ssr */} nzxt document