Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 88 additions & 91 deletions apps/dashboard/next.config.js → apps/dashboard/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import type { SentryBuildOptions } from "@sentry/nextjs";
import type { NextConfig } from "next";
import type { RemotePattern } from "next/dist/shared/lib/image-config";
import FRAMER_PATHS from "./framer-rewrites";
import getRedirects from "./redirects";

const ContentSecurityPolicy = `
default-src 'self';
Expand Down Expand Up @@ -37,15 +41,9 @@ const securityHeaders = [
},
];

const redirects = require("./redirects");
const FRAMER_PATHS = require("./framer-rewrites");

/**
* @returns {import('next').RemotePattern[]}
*/
function determineIpfsGateways() {
// add the clientId ipfs gateways
const remotePatterns = [];
const remotePatterns: RemotePattern[] = [];
if (process.env.API_ROUTES_CLIENT_ID) {
remotePatterns.push({
protocol: "https",
Expand Down Expand Up @@ -84,23 +82,39 @@ function determineIpfsGateways() {
return remotePatterns;
}

/** @type {import('next').NextConfig} */
const moduleExports = {
webpack: (config, { dev }) => {
if (config.cache && !dev) {
config.cache = Object.freeze({
type: "memory",
});
config.cache.maxMemoryGenerations = 0;
}
config.externals.push("pino-pretty");
config.module = {
...config.module,
exprContextCritical: false,
};
// Important: return the modified config
return config;
},
const SENTRY_OPTIONS: SentryBuildOptions = {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "thirdweb-dev",
project: "dashboard",
// An auth token is required for uploading source maps.
authToken: process.env.SENTRY_AUTH_TOKEN,
// Suppresses source map uploading logs during build
silent: true,
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/err",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: false,
};

const baseNextConfig: NextConfig = {
async headers() {
return [
{
Expand All @@ -117,7 +131,7 @@ const moduleExports = {
];
},
async redirects() {
return redirects();
return getRedirects();
},
async rewrites() {
return [
Expand Down Expand Up @@ -151,74 +165,57 @@ const moduleExports = {
...determineIpfsGateways(),
],
},
reactStrictMode: true,
experimental: {
scrollRestoration: true,
webpackBuildWorker: true,
serverSourceMaps: false,
},
cacheMaxMemorySize: 0,
compiler: {
emotion: true,
},
productionBrowserSourceMaps: false,
reactStrictMode: true,
};

const { withSentryConfig } = require("@sentry/nextjs");
const { withPlausibleProxy } = require("next-plausible");

// we only want sentry on production environments
const wSentry =
process.env.NODE_ENV === "production" ? withSentryConfig : (x) => x;

const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});

module.exports = withBundleAnalyzer(
withPlausibleProxy({
customDomain: "https://pl.thirdweb.com",
scriptName: "pl",
})(
wSentry(moduleExports, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "thirdweb-dev",
project: "dashboard",
// An auth token is required for uploading source maps.
authToken: process.env.SENTRY_AUTH_TOKEN,
// Suppresses source map uploading logs during build
silent: true,
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: false,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/err",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: false,
function getConfig(): NextConfig {
if (process.env.NODE_ENV === "production") {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withPlausibleProxy } = require("next-plausible");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withSentryConfig } = require("@sentry/nextjs");
return withBundleAnalyzer(
withPlausibleProxy({
customDomain: "https://pl.thirdweb.com",
scriptName: "pl",
})(
withSentryConfig(
{
...baseNextConfig,
experimental: {
webpackBuildWorker: true,
},
// @ts-expect-error - this is a valid option
webpack: (config, { dev }) => {
if (config.cache && !dev) {
config.cache = Object.freeze({
type: "filesystem",
maxMemoryGenerations: 0,
});
}
config.externals.push("pino-pretty");
config.module = {
...config.module,
exprContextCritical: false,
};
// Important: return the modified config
return config;
},
},
SENTRY_OPTIONS,
),
),
);
}
// otherwise return the base
return baseNextConfig;
}

/**
* Disables the Sentry Webpack plugin on the server.
* See: https://github.com/getsentry/sentry-javascript/issues/10468#issuecomment-2004710692
*/
disableServerWebpackPlugin: true,
}),
),
);
export default getConfig();
14 changes: 7 additions & 7 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "next dev",
"build": "next build",
"dev": "next dev --turbopack",
"build": "NODE_OPTIONS=--max-old-space-size=6144 next build",
"start": "next start",
"format": "biome format ./src --write",
"lint": "biome check ./src && knip && eslint ./src",
Expand Down Expand Up @@ -50,7 +50,7 @@
"@shazow/whatsabi": "^0.16.0",
"@stripe/react-stripe-js": "^2.8.1",
"@stripe/stripe-js": "^3.5.0",
"@tanstack/react-query": "5.59.19",
"@tanstack/react-query": "5.59.20",
"@tanstack/react-table": "^8.17.3",
"@thirdweb-dev/service-utils": "workspace:*",
"@vercel/functions": "^1.4.2",
Expand All @@ -70,7 +70,7 @@
"ipaddr.js": "^2.2.0",
"lottie-react": "^2.4.0",
"lucide-react": "0.454.0",
"next": "15.0.2",
"next": "15.0.3",
"next-plausible": "^3.12.3",
"next-seo": "^6.5.0",
"next-themes": "^0.4.3",
Expand Down Expand Up @@ -107,8 +107,8 @@
"devDependencies": {
"@chakra-ui/cli": "^2.4.1",
"@chromatic-com/storybook": "3.2.2",
"@next/bundle-analyzer": "15.0.2",
"@next/eslint-plugin-next": "15.0.2",
"@next/bundle-analyzer": "15.0.3",
"@next/eslint-plugin-next": "15.0.3",
"@playwright/test": "1.48.2",
"@storybook/addon-essentials": "8.4.2",
"@storybook/addon-interactions": "8.4.2",
Expand Down Expand Up @@ -137,7 +137,7 @@
"eslint-config-biome": "1.9.3",
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
"eslint-plugin-storybook": "^0.9.0",
"knip": "5.36.2",
"knip": "5.36.3",
"next-sitemap": "^4.2.3",
"postcss": "8.4.47",
"storybook": "8.4.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import emptyStateHeaderImage from "/public/assets/engine/empty-state-header.png";
import emptyStateHeaderImage from "../../../../../../../../../public/assets/engine/empty-state-header.png";
import { EngineInstancesTable } from "./engine-instances-table";

export const EngineInstancesList = (props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Button } from "@/components/ui/button";
import { TrackedLinkTW } from "@/components/ui/tracked-link";
import Image from "next/image";
import exploreFeatureImage from "/public/assets/landingpage/explore-featured.png";
import heroIcon1 from "/public/assets/product-pages/publish/hero-icon-1.png";
import heroIcon2 from "/public/assets/product-pages/publish/hero-icon-2.png";
import exploreFeatureImage from "../../../../public/assets/landingpage/explore-featured.png";
import heroIcon1 from "../../../../public/assets/product-pages/publish/hero-icon-1.png";
import heroIcon2 from "../../../../public/assets/product-pages/publish/hero-icon-2.png";

export const PublishUpsellCard: React.FC = () => {
return (
Expand Down
60 changes: 30 additions & 30 deletions apps/dashboard/src/components/product-pages/common/nav/data.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import connectIcon from "/public/assets/landingpage/connect-icon.png";
import contractsIcon from "/public/assets/landingpage/contracts-icon.png";
import engineIcon from "/public/assets/landingpage/engine-icon.png";
import authIcon from "/public/assets/product-icons/auth.png";
import cliIcon from "/public/assets/product-icons/cli.svg";
import contractsProductIcon from "/public/assets/product-icons/contracts.png";
import dashboardProductIcon from "/public/assets/product-icons/dashboard.svg";
import deployIcon from "/public/assets/product-icons/deploy.png";
import embeddedWalletIcon from "/public/assets/product-icons/embedded-wallet.png";
import engineProductIcon from "/public/assets/product-icons/engine.png";
import extensionIcon from "/public/assets/product-icons/extensions.png";
import netIcon from "/public/assets/product-icons/net.svg";
import payIcon from "/public/assets/product-icons/pay.svg";
import publishIcon from "/public/assets/product-icons/publish.png";
import reactIcon from "/public/assets/product-icons/react.svg";
import rpcEdgeIcon from "/public/assets/product-icons/rpc-edge.png";
import smartWalletIcon from "/public/assets/product-icons/smart-wallet.png";
import solidityIcon from "/public/assets/product-icons/solidity.svg";
import storageIcon from "/public/assets/product-icons/storage.png";
import typescriptIcon from "/public/assets/product-icons/typescript.svg";
import unityIcon from "/public/assets/product-icons/unity.svg";
import walletSdkIcon from "/public/assets/product-icons/wallet-sdk.png";
import chainsIcon from "/public/assets/solutions-icons/chains.svg";
import gamingIcon from "/public/assets/solutions-icons/gaming.svg";
import datastoreIcon from "/public/assets/tw-icons/datastore.png";
import docsIcon from "/public/assets/tw-icons/docs.svg";
import guidesIcon from "/public/assets/tw-icons/guides.svg";
import missionIcon from "/public/assets/tw-icons/mission.svg";
import opensourceIcon from "/public/assets/tw-icons/opensource.svg";
import templatesIcon from "/public/assets/tw-icons/templates.svg";
import connectIcon from "../../../../../public/assets/landingpage/connect-icon.png";
import contractsIcon from "../../../../../public/assets/landingpage/contracts-icon.png";
import engineIcon from "../../../../../public/assets/landingpage/engine-icon.png";
import authIcon from "../../../../../public/assets/product-icons/auth.png";
import cliIcon from "../../../../../public/assets/product-icons/cli.svg";
import contractsProductIcon from "../../../../../public/assets/product-icons/contracts.png";
import dashboardProductIcon from "../../../../../public/assets/product-icons/dashboard.svg";
import deployIcon from "../../../../../public/assets/product-icons/deploy.png";
import embeddedWalletIcon from "../../../../../public/assets/product-icons/embedded-wallet.png";
import engineProductIcon from "../../../../../public/assets/product-icons/engine.png";
import extensionIcon from "../../../../../public/assets/product-icons/extensions.png";
import netIcon from "../../../../../public/assets/product-icons/net.svg";
import payIcon from "../../../../../public/assets/product-icons/pay.svg";
import publishIcon from "../../../../../public/assets/product-icons/publish.png";
import reactIcon from "../../../../../public/assets/product-icons/react.svg";
import rpcEdgeIcon from "../../../../../public/assets/product-icons/rpc-edge.png";
import smartWalletIcon from "../../../../../public/assets/product-icons/smart-wallet.png";
import solidityIcon from "../../../../../public/assets/product-icons/solidity.svg";
import storageIcon from "../../../../../public/assets/product-icons/storage.png";
import typescriptIcon from "../../../../../public/assets/product-icons/typescript.svg";
import unityIcon from "../../../../../public/assets/product-icons/unity.svg";
import walletSdkIcon from "../../../../../public/assets/product-icons/wallet-sdk.png";
import chainsIcon from "../../../../../public/assets/solutions-icons/chains.svg";
import gamingIcon from "../../../../../public/assets/solutions-icons/gaming.svg";
import datastoreIcon from "../../../../../public/assets/tw-icons/datastore.png";
import docsIcon from "../../../../../public/assets/tw-icons/docs.svg";
import guidesIcon from "../../../../../public/assets/tw-icons/guides.svg";
import missionIcon from "../../../../../public/assets/tw-icons/mission.svg";
import opensourceIcon from "../../../../../public/assets/tw-icons/opensource.svg";
import templatesIcon from "../../../../../public/assets/tw-icons/templates.svg";
import type { SectionItemProps, SectionProps } from "./types";

export const PRODUCT_SECTIONS: SectionProps[] = [
Expand Down
6 changes: 3 additions & 3 deletions apps/playground-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "1.1.3",
"@tanstack/react-query": "5.59.19",
"@tanstack/react-query": "5.59.20",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "0.454.0",
"next": "15.0.2",
"next": "15.0.3",
"next-themes": "^0.4.3",
"prettier": "^3.3.2",
"react": "19.0.0-rc-69d4b800-20241021",
Expand All @@ -48,7 +48,7 @@
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "8.57.0",
"eslint-config-next": "15.0.2",
"eslint-config-next": "15.0.3",
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
"postcss": "8.4.47",
"tailwindcss": "3.4.14",
Expand Down
Loading
Loading