Template
- 添加 React Router 和 Tailwind CSS 依赖 - 移除旧的 CSS 文件,改用模块化样式 - 更新 lint-staged 配置以跳过 CSS 文件 - 重构 App 组件以使用新的导航和样式
17 lines
440 B
TypeScript
17 lines
440 B
TypeScript
import { StrictMode } from "react";
|
|
import { createRoot } from "react-dom/client";
|
|
import { RouterProvider } from "react-router-dom";
|
|
import "./styles/index.css";
|
|
import { router } from "./router/index.tsx";
|
|
|
|
const rootElement = document.getElementById("root");
|
|
if (!rootElement) {
|
|
throw new Error("Failed to find the root element");
|
|
}
|
|
|
|
createRoot(rootElement).render(
|
|
<StrictMode>
|
|
<RouterProvider router={router} />
|
|
</StrictMode>,
|
|
);
|