mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +00:00
75876474a2
* Convert swagger 2.0 to OpenAPI 3 * Format
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
const { withSentryConfig } = require('@sentry/nextjs');
|
|
|
|
module.exports = withSentryConfig(
|
|
{
|
|
env: {
|
|
BUILD_VERSION: (process.env.GITHUB_SHA ?? '').slice(0, 7),
|
|
SENTRY_DSN: process.env.SENTRY_DSN ?? '',
|
|
SENTRY_ENVIRONMENT: process.env.SENTRY_ENVIRONMENT ?? 'development',
|
|
},
|
|
|
|
webpack(config) {
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
|
|
// Required for `swagger2openapi` to work:
|
|
fs: false,
|
|
path: false,
|
|
http: false,
|
|
};
|
|
|
|
return config;
|
|
},
|
|
},
|
|
{
|
|
silent: true,
|
|
org: process.env.SENTRY_ORG,
|
|
project: process.env.SENTRY_PROJECT,
|
|
},
|
|
{
|
|
// Upload a larger set of source maps for prettier stack traces (increases build time)
|
|
widenClientFileUpload: true,
|
|
transpileClientSDK: false,
|
|
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
|
|
tunnelRoute: '/~gitbook/monitoring',
|
|
// Don't hide source maps from generated client bundles
|
|
hideSourceMaps: false,
|
|
disableLogger: true,
|
|
automaticVercelMonitors: false,
|
|
},
|
|
);
|