Skip to content

Commit 04ea810

Browse files
authored
Merge pull request #440 from trycompai/lewis/loading-on-implementation
chore: update build script to use turbopack for improved performance
2 parents a07f8b4 + b190faa commit 04ea810

9 files changed

+7
-131
lines changed

apps/app/liveblocks.config.ts

-14
This file was deleted.

apps/app/next.config.ts

+6-32
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import { withSentryConfig } from "@sentry/nextjs";
21
import "./src/env.mjs";
32
import type { NextConfig } from "next";
43

54
const config: NextConfig = {
65
poweredByHeader: false,
76
reactStrictMode: true,
7+
turbopack: {
8+
resolveAlias: {
9+
underscore: "lodash",
10+
},
11+
},
812
images: {
913
remotePatterns: [
1014
{
@@ -41,34 +45,4 @@ const config: NextConfig = {
4145
skipTrailingSlashRedirect: true,
4246
};
4347

44-
export default withSentryConfig(config, {
45-
// For all available options, see:
46-
// https://www.npmjs.com/package/@sentry/webpack-plugin#options
47-
48-
org: "bubba-ai",
49-
project: "app",
50-
51-
// Only print logs for uploading source maps in CI
52-
silent: !process.env.CI,
53-
54-
// For all available options, see:
55-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
56-
57-
// Upload a larger set of source maps for prettier stack traces (increases build time)
58-
widenClientFileUpload: true,
59-
60-
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
61-
// This can increase your server load as well as your hosting bill.
62-
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
63-
// side errors will fail.
64-
tunnelRoute: "/monitoring",
65-
66-
// Automatically tree-shake Sentry logger statements to reduce bundle size
67-
disableLogger: true,
68-
69-
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
70-
// See the following for more information:
71-
// https://docs.sentry.io/product/crons/
72-
// https://vercel.com/docs/cron-jobs
73-
automaticVercelMonitors: true,
74-
});
48+
export default config;

apps/app/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "bun run apply-migrations && bunx concurrently --kill-others --names \"next,trigger\" --prefix-colors \"yellow,blue\" \"next dev --turbo -p 3000\" \"bun run trigger:dev\"",
77
"trigger:dev": "npx trigger.dev@latest dev",
8-
"build": "next build",
8+
"build": "next build --turbopack",
99
"start": "next start",
1010
"lint": "biome lint ./src",
1111
"apply-migrations": "cd ../../packages/db && bunx prisma migrate dev && cd ../../apps/app",
@@ -38,7 +38,6 @@
3838
"@novu/react": "^2.6.6",
3939
"@number-flow/react": "^0.5.9",
4040
"@prisma/instrumentation": "6.6.0",
41-
"@sentry/nextjs": "^9.12.0",
4241
"@tanstack/react-query": "^5.74.3",
4342
"@tanstack/react-table": "^8.21.3",
4443
"@tiptap/extension-table": "^2.11.7",

apps/app/sentry.edge.config.ts

-16
This file was deleted.

apps/app/sentry.server.config.ts

-18
This file was deleted.

apps/app/src/app/global-error.tsx

-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
"use client";
22

3-
import * as Sentry from "@sentry/nextjs";
4-
import { useEffect } from "react";
5-
63
import { Button } from "@comp/ui/button";
74
import NextError from "next/error";
85
import Link from "next/link";
96

107
export default function GlobalError({ error, reset }: { error: Error, reset: () => void }) {
11-
useEffect(() => {
12-
Sentry.captureException(error);
13-
}, [error]);
14-
158
return (
169
<html lang="en">
1710
<body>

apps/app/src/instrumentation-client.ts

-28
This file was deleted.

apps/app/src/instrumentation.ts

-13
This file was deleted.

turbo.json

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"ANTHROPIC_API_KEY",
4242
"REVALIDATION_SECRET",
4343
"GROQ_API_KEY",
44-
"SENTRY_AUTH_TOKEN",
4544
"RESEND_AUDIENCE_ID",
4645
"FIRECRAWL_API_KEY"
4746
],

0 commit comments

Comments
 (0)