feat(server): add safety checks during dev (#1489)
Co-authored-by: Reed von Redwitz <reed+github@vonredwitz.com>
This commit is contained in:
co-authored by
Reed von Redwitz
parent
430be774e2
commit
a7fe9d04f1
@@ -5,7 +5,6 @@ let CSS_TO_INJECT = "h1 { text-decoration: underline; }";
|
||||
export default {
|
||||
name: "css-inject-async",
|
||||
async renderAsync(ctx) {
|
||||
await new Promise((res) => setTimeout(res, 50));
|
||||
const res = await ctx.renderAsync();
|
||||
if (res.requiresHydration) {
|
||||
CSS_TO_INJECT += " h1 { font-style: italic; }";
|
||||
|
||||
Reference in New Issue
Block a user