فهرست منبع

chore: stop using TypeScript path aliases

Aaron Bassett 6 ماه پیش
والد
کامیت
68c4312c20

+ 2 - 3
apps/developer-hub/src/app/(docs)/[section]/[...slug]/page.tsx

@@ -1,8 +1,7 @@
-export { DocumentationPage as default } from "@/src/components/Pages/DocumentationPage";
-
-import { source } from "@/src/source";
+export { DocumentationPage as default } from "../../../../components/Pages/DocumentationPage";
 import type { Metadata } from "next";
 import { notFound } from "next/navigation";
+import { source } from "../../../../source";
 
 export async function generateStaticParams() {
   return source.generateParams();

+ 2 - 3
apps/developer-hub/src/app/(docs)/[section]/page.tsx

@@ -1,8 +1,7 @@
-export { LandingPage as default } from "@/src/components/Pages/LandingPage";
-
-import { source } from "@/src/source";
+export { LandingPage as default } from "../../../components/Pages/LandingPage";
 import type { Metadata } from "next";
 import { notFound } from "next/navigation";
+import { source } from "../../../source";
 
 export async function generateStaticParams() {
   return source.generateParams();

+ 1 - 1
apps/developer-hub/src/app/(docs)/layout.tsx

@@ -1,6 +1,6 @@
-import { docsOptions } from "@/src/config/layout.config";
 import { DocsLayout } from "fumadocs-ui/layouts/docs";
 import type { ReactNode } from "react";
+import { docsOptions } from "../../config/layout.config";
 
 export default function Layout({ children }: { children: ReactNode }) {
   return <DocsLayout {...docsOptions}>{children}</DocsLayout>;

+ 1 - 1
apps/developer-hub/src/app/(homepage)/layout.tsx

@@ -1,6 +1,6 @@
-import { baseOptions } from "@/src/config/layout.config";
 import { HomeLayout } from "fumadocs-ui/layouts/home";
 import type { ReactNode } from "react";
+import { baseOptions } from "../../config/layout.config";
 
 export default function Layout({ children }: { children: ReactNode }) {
   return <HomeLayout {...baseOptions}>{children}</HomeLayout>;

+ 1 - 1
apps/developer-hub/src/app/(homepage)/page.tsx

@@ -1 +1 @@
-export { Homepage as default } from "@/src/components/Pages/Homepage";
+export { Homepage as default } from "../../components/Pages/Homepage";

+ 2 - 2
apps/developer-hub/src/components/Pages/BasePage/index.tsx

@@ -1,5 +1,3 @@
-import { getMDXComponents } from "@/src/mdx-components";
-import { source } from "@/src/source";
 import {
   DocsBody,
   DocsDescription,
@@ -7,6 +5,8 @@ import {
   DocsTitle,
 } from "fumadocs-ui/page";
 import { notFound } from "next/navigation";
+import { getMDXComponents } from "../../../mdx-components";
+import { source } from "../../../source";
 
 export function BasePage(props: { params: { slug: string[] } }) {
   const page = source.getPage(props.params.slug);

+ 1 - 1
apps/developer-hub/src/config/layout.config.tsx

@@ -1,6 +1,6 @@
-import { source } from "@/src/source";
 import type { DocsLayoutProps } from "fumadocs-ui/layouts/docs";
 import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
+import { source } from "../source";
 
 export const baseOptions: BaseLayoutProps = {
   nav: {

+ 1 - 1
apps/developer-hub/src/source.ts

@@ -1,4 +1,3 @@
-import { docs } from "@/.source";
 import {
   CardsThree,
   ChartLine,
@@ -10,6 +9,7 @@ import {
 import type { InferMetaType, InferPageType } from "fumadocs-core/source";
 import { loader } from "fumadocs-core/source";
 import { createElement } from "react";
+import { docs } from "../.source";
 
 const icons: Record<string, React.ComponentType> = {
   CardsThree,

+ 1 - 7
apps/developer-hub/tsconfig.json

@@ -1,11 +1,5 @@
 {
   "extends": "@cprussin/tsconfig/nextjs.json",
   "include": ["svg.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
-  "exclude": ["node_modules"],
-  "compilerOptions": {
-    "baseUrl": ".",
-    "paths": {
-      "@/*": ["./*"]
-    }
-  }
+  "exclude": ["node_modules"]
 }