danswer/web/next.config.js

27 lines
783 B
JavaScript
Raw Permalink Normal View History

// Get Danswer Web Version
2023-11-03 18:37:01 -07:00
const { version: package_version } = require("./package.json"); // version from package.json
const env_version = process.env.DANSWER_VERSION; // version from env variable
// Use env version if set & valid, otherwise default to package version
2023-11-03 18:37:01 -07:00
const version = env_version || package_version;
2023-04-28 22:40:46 -07:00
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
2024-05-17 13:49:45 -07:00
swcMinify: true,
publicRuntimeConfig: {
version,
},
2023-04-28 22:40:46 -07:00
};
const { withSentryConfig } = require("@sentry/nextjs");
module.exports = withSentryConfig(nextConfig, {
org: "danswer",
project: "javascript-nextjs",
// An auth token is required for uploading source maps.
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: false, // Can be used to suppress logs
});