Skip to content

Commit

Permalink
fix: imports in commerce website server
Browse files Browse the repository at this point in the history
  • Loading branch information
Yokaito committed Nov 22, 2023
1 parent 477a246 commit 229429c
Show file tree
Hide file tree
Showing 8 changed files with 2,554 additions and 6,289 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"cSpell.words": [
"healthcheck",
"quixer",
"Quixer",
"shopify",
"superjson",
Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const nextConfig = {
ppr: true
},
reactStrictMode: true,
transpilePackages: ['ui', 'server'],
transpilePackages: ['ui', '@quixer/server'],
images: {
formats: ['image/avif', 'image/webp'],
remotePatterns: [
Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"next": "14.0.3-canary.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"server": "workspace:*",
"@quixer/server": "workspace:*",
"server-only": "^0.0.1",
"superjson": "^2.2.1",
"tailwind-merge": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/src/app/api/trpc/[trpc]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import env from '@/sdk/env';
import { appRouter, createTRPCContext, integrations } from '@quixer/server';
import { fetchRequestHandler } from '@trpc/server/adapters/fetch';
import { type NextRequest } from 'next/server';
import { appRouter, createTRPCContext, integrations } from 'server';

const handler = (req: NextRequest) =>
fetchRequestHandler({
Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/src/sdk/lib/trpc/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { loggerLink, unstable_httpBatchStreamLink } from '@trpc/client';
import { createTRPCReact } from '@trpc/react-query';
import { useMemo } from 'react';

import { type AppRouter } from 'server';
import { type AppRouter } from '@quixer/server';
import { getUrl, transformer } from './shared';

export const api = createTRPCReact<AppRouter>();
Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/src/sdk/lib/trpc/server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'server-only'; // Make sure you can't import this on client

import env from '@/sdk/env';
import { appRouter, createTRPCContext, integrations } from '@quixer/server';
import { headers } from 'next/headers';
import { appRouter, createTRPCContext, integrations } from 'server';

type Caller = ReturnType<typeof appRouter.createCaller>;

Expand Down
2 changes: 1 addition & 1 deletion apps/commerce/src/sdk/lib/trpc/shared.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type inferRouterInputs, type inferRouterOutputs } from '@trpc/server';
import superjson from 'superjson';

import { type AppRouter } from 'server';
import { type AppRouter } from '@quixer/server';

export const transformer = superjson;

Expand Down
Loading

0 comments on commit 229429c

Please sign in to comment.