Compare commits

...

2 Commits

Author SHA1 Message Date
pablodanswer
fd1de1b3b0 temporary increase to size 2025-01-24 09:40:24 -08:00
pablodanswer
23b3661cdc remove sourcemaps 2025-01-24 09:32:10 -08:00
3 changed files with 19 additions and 12 deletions

View File

@@ -18,6 +18,9 @@ FROM base AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Increase Node.js memory limit for the build process
ENV NODE_OPTIONS="--max-old-space-size=4096"
# pull in source code / package.json / package-lock.json
COPY . .

View File

@@ -38,6 +38,14 @@ const nextConfig = {
},
],
},
// Add these options to optimize the build
swcMinify: true,
experimental: {
optimizeCss: true,
// Disable unnecessary features
scrollRestoration: false,
legacyBrowsers: false,
},
async headers() {
return [
{
@@ -79,21 +87,17 @@ const sentryEnabled = Boolean(
process.env.SENTRY_AUTH_TOKEN && process.env.NEXT_PUBLIC_SENTRY_DSN
);
// Sentry webpack plugin options
// Modify the Sentry webpack plugin options
const sentryWebpackPluginOptions = {
org: process.env.SENTRY_ORG || "onyx",
project: process.env.SENTRY_PROJECT || "data-plane-web",
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: !sentryEnabled, // Silence output when Sentry is disabled
dryRun: !sentryEnabled, // Don't upload source maps when Sentry is disabled
sourceMaps: {
include: ["./.next"],
ignore: ["node_modules"],
urlPrefix: "~/_next",
stripPrefix: ["webpack://_N_E/"],
validate: true,
cleanArtifacts: true,
},
silent: !sentryEnabled,
dryRun: !sentryEnabled,
sourceMaps: false,
// Add this option to disable source map generation
disableServerWebpackPlugin: true,
disableClientWebpackPlugin: true,
};
// Export the module with conditional Sentry configuration

View File

@@ -5,7 +5,7 @@ if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
// Capture unhandled exceptions and performance data
enableTracing: true,
enableTracing: false,
integrations: [],
tracesSampleRate: 0.1,
});