Skip to content

Commit f019eb3

Browse files
authored
chore: rm baseUrl from all tsconfig.jsons (#6381)
1 parent e90b948 commit f019eb3

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import '../styles/global.css';
22
import type { Session } from 'next-auth';
33
import { getSession, SessionProvider } from 'next-auth/react';
44
import type { AppType } from 'next/app';
5-
import { trpc } from 'utils/trpc';
5+
import { trpc } from '~/utils/trpc';
66

77
const MyApp: AppType<{ session: Session | null }> = ({
88
Component,

src/pages/about.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from 'next/link';
22
import { useState } from 'react';
3-
import { trpc } from 'utils/trpc';
3+
import { trpc } from '~/utils/trpc';
44

55
export default function AboutPage() {
66
const [num, setNumber] = useState<number>();

src/pages/api/trpc/[trpc].ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* This file contains the tRPC http response handler and context creation for Next.js
33
*/
44
import * as trpcNext from '@trpc/server/adapters/next';
5-
import { createContext } from 'server/context';
6-
import type { AppRouter } from 'server/routers/_app';
7-
import { appRouter } from 'server/routers/_app';
5+
import { createContext } from '~/server/context';
6+
import type { AppRouter } from '~/server/routers/_app';
7+
import { appRouter } from '~/server/routers/_app';
88

99
export default trpcNext.createNextApiHandler<AppRouter>({
1010
router: appRouter,

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { trpc } from '../utils/trpc';
1+
import { trpc } from '~/utils/trpc';
22
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
33
import { signIn, signOut, useSession } from 'next-auth/react';
44
import Head from 'next/head';

src/utils/trpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ssrPrepass } from '@trpc/next/ssrPrepass';
1010
import type { inferRouterOutputs } from '@trpc/server';
1111
import type { NextPageContext } from 'next';
1212
import getConfig from 'next/config';
13-
import type { AppRouter } from 'server/routers/_app';
13+
import type { AppRouter } from '~/server/routers/_app';
1414
import superjson from 'superjson';
1515

1616
// ℹ️ Type-only import:

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
1616
"jsx": "preserve",
17-
"baseUrl": "./src",
17+
18+
"paths": {
19+
"~/*": ["./src/*"]
20+
},
1821
"incremental": true
1922
},
2023
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],

0 commit comments

Comments
 (0)