fix(ssr): update import paths to use alias '@' instead of '~'

This commit is contained in:
DIYgod
2025-10-15 14:27:26 +08:00
parent 04fbe01a84
commit bd3ab265d1
12 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { DEEPLINK_SCHEME } from "@follow/shared/constants"
import type { FollowClient } from "@follow-app/client-sdk"
import type { defineMetadata } from "~/meta-handler"
import type { defineMetadata } from "@/meta-handler"
type Target = {
id: string
@@ -1,8 +1,8 @@
import type { GetHydrateData } from "@client/lib/helper"
import type { AuthProvider } from "@client/query/users"
import { createApiFetch } from "~/lib/api-client"
import { defineMetadata } from "~/meta-handler"
import { createApiFetch } from "@/lib/api-client"
import { defineMetadata } from "@/meta-handler"
const getTypedProviders = async () => {
const apiFetch = createApiFetch()
@@ -1,8 +1,8 @@
import type { GetHydrateData } from "@client/lib/helper"
import { APPLE_APP_STORE_ID } from "@follow/constants"
import { callNotFound } from "~/lib/not-found"
import { defineMetadata } from "~/meta-handler"
import { callNotFound } from "@/lib/not-found"
import { defineMetadata } from "@/meta-handler"
const meta = defineMetadata(async ({ params, apiClient, origin }) => {
const feedId = params.id
@@ -1,7 +1,7 @@
import { APPLE_APP_STORE_ID } from "@follow/constants"
import { callNotFound } from "~/lib/not-found"
import { defineMetadata } from "~/meta-handler"
import { callNotFound } from "@/lib/not-found"
import { defineMetadata } from "@/meta-handler"
export default defineMetadata(async ({ params, apiClient, origin }) => {
const listId = params.id!
@@ -1,8 +1,8 @@
import { isBizId } from "@follow/utils/utils"
import { callNotFound } from "~/lib/not-found"
import type { MetaTag } from "~/meta-handler"
import { defineMetadata } from "~/meta-handler"
import { callNotFound } from "@/lib/not-found"
import type { MetaTag } from "@/meta-handler"
import { defineMetadata } from "@/meta-handler"
export default defineMetadata(async ({ params, apiClient, origin }): Promise<MetaTag[]> => {
const userIdOrHandle = params.id
+1 -2
View File
@@ -11,8 +11,7 @@ import Fastify from "fastify"
import { nanoid } from "nanoid"
import { FetchError } from "ofetch"
import { MetaError } from "~/meta-handler"
import { MetaError } from "./src/meta-handler"
import { globalRoute } from "./src/router/global"
import { ogRoute } from "./src/router/og"
+2 -2
View File
@@ -9,8 +9,8 @@ import { FetchError } from "ofetch"
import path, { dirname, resolve } from "pathe"
import xss from "xss"
import { NotFoundError } from "~/lib/not-found"
import { buildSeoMetaTags } from "~/lib/seo"
import { NotFoundError } from "@/lib/not-found"
import { buildSeoMetaTags } from "@/lib/seo"
import { injectMetaHandler, MetaError } from "../meta-handler"
+1 -1
View File
@@ -3,7 +3,7 @@ import { formatNumber } from "@follow/utils"
import type { FollowClient } from "@follow-app/client-sdk"
import * as React from "react"
import { renderToImage } from "~/lib/og/render-to-image"
import { renderToImage } from "@/lib/og/render-to-image"
import { getImageBase64, OGAvatar, OGCanvas } from "./__base"
+1 -1
View File
@@ -2,7 +2,7 @@ import { Readable } from "node:stream"
import type { FastifyInstance, FastifyReply } from "fastify"
import { createFollowClient } from "~/lib/api-client"
import { createFollowClient } from "@/lib/api-client"
import { renderFeedOG } from "./feed"
import { renderListOG } from "./list"
+1 -1
View File
@@ -2,7 +2,7 @@ import { getFeedIconSrc } from "@follow/components/utils/icon.js"
import type { FollowClient } from "@follow-app/client-sdk"
import * as React from "react"
import { renderToImage } from "~/lib/og/render-to-image"
import { renderToImage } from "@/lib/og/render-to-image"
import { getImageBase64, OGAvatar, OGCanvas } from "./__base"
+1 -1
View File
@@ -2,7 +2,7 @@ import { isBizId } from "@follow/utils/utils"
import type { FollowClient } from "@follow-app/client-sdk"
import * as React from "react"
import { renderToImage } from "~/lib/og/render-to-image"
import { renderToImage } from "@/lib/og/render-to-image"
import { getImageBase64, OGAvatar, OGCanvas } from "./__base"
+1 -1
View File
@@ -22,7 +22,7 @@
}
],
"paths": {
"~/*": ["./src/*"],
"@/*": ["./src/*"],
"@client/*": ["./client/*"],
"@locales/*": ["../../locales/*"]
}