2023-11-03 18:02:39 -07:00
|
|
|
// Get Danswer Web Version
|
2023-11-03 18:37:01 -07:00
|
|
|
const { version: package_version } = require("./package.json"); // version from package.json
|
2023-11-03 18:02:39 -07:00
|
|
|
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-11-03 18:02:39 -07:00
|
|
|
|
2023-04-28 22:40:46 -07:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
2023-05-05 16:48:36 -07:00
|
|
|
output: "standalone",
|
2024-05-17 13:49:45 -07:00
|
|
|
swcMinify: true,
|
2023-11-03 18:02:39 -07:00
|
|
|
publicRuntimeConfig: {
|
|
|
|
version,
|
|
|
|
},
|
2023-04-28 22:40:46 -07:00
|
|
|
};
|
|
|
|
|
2024-10-17 16:20:37 -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
|
|
|
|
});
|