perf: optimize bundle and load times via dynamic CSS imports, Webpack vendor chunking, and conditional map loading.(peak male content)
Build and Release / release (push) Successful in 37s

This commit is contained in:
taDuc
2026-06-04 10:21:23 +07:00
parent fb816fca11
commit 6c509a6b54
6 changed files with 147 additions and 126 deletions
@@ -1,7 +1,7 @@
"use client";
import { useEffect, useMemo, useRef, useState, memo } from "react";
import "react-quill-new/dist/quill.snow.css";
// Loaded dynamically inside the component to prevent render-blocking
import type { Entity } from "@/uhm/api/entities";
import type { Wiki } from "@/uhm/api/wikis";
@@ -139,6 +139,10 @@ function PublicWikiSidebar({
const contentRootRef = useRef<HTMLDivElement | null>(null);
const tocContainerRef = useRef<HTMLDivElement | null>(null);
useEffect(() => {
import("react-quill-new/dist/quill.snow.css");
}, []);
const [localWidth, setLocalWidth] = useState<number>(() => {
if (typeof window !== "undefined") {
const saved = localStorage.getItem("public-wiki-sidebar-width");