2024-03-26 19:24:42 +05:30
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
2024-05-08 23:01:20 +05:30
|
|
|
/** @type {import("next").NextConfig} */
|
2025-03-24 18:55:59 +05:30
|
|
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
2023-05-03 13:36:55 +05:30
|
|
|
require("dotenv").config({ path: ".env" });
|
2023-09-14 16:05:31 +05:30
|
|
|
|
2022-11-19 19:51:26 +05:30
|
|
|
const nextConfig = {
|
2024-06-14 17:00:35 +05:30
|
|
|
trailingSlash: true,
|
2024-04-06 17:13:24 +05:30
|
|
|
reactStrictMode: false,
|
|
|
|
|
swcMinify: true,
|
|
|
|
|
output: "standalone",
|
2023-12-20 13:49:17 +05:30
|
|
|
async headers() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: "/(.*)?",
|
2025-08-26 02:23:50 +05:30
|
|
|
headers: [{ key: "X-Frame-Options", value: "DENY" }],
|
2023-12-20 13:49:17 +05:30
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
2022-11-19 19:51:26 +05:30
|
|
|
images: {
|
2023-10-27 13:14:03 +05:30
|
|
|
unoptimized: true,
|
2022-11-19 19:51:26 +05:30
|
|
|
},
|
2025-03-21 01:51:50 +05:30
|
|
|
experimental: {
|
|
|
|
|
optimizePackageImports: [
|
|
|
|
|
"lucide-react",
|
|
|
|
|
"date-fns",
|
|
|
|
|
"@headlessui/react",
|
|
|
|
|
"react-color",
|
|
|
|
|
"react-day-picker",
|
|
|
|
|
"react-dropzone",
|
|
|
|
|
"react-hook-form",
|
2025-09-26 17:59:31 +05:30
|
|
|
"lodash-es",
|
2025-03-21 01:51:50 +05:30
|
|
|
"clsx",
|
|
|
|
|
"tailwind-merge",
|
2025-07-01 00:24:39 -07:00
|
|
|
"@plane/constants",
|
|
|
|
|
"@plane/editor",
|
|
|
|
|
"@plane/hooks",
|
|
|
|
|
"@plane/i18n",
|
|
|
|
|
"@plane/logger",
|
|
|
|
|
"@plane/propel",
|
|
|
|
|
"@plane/services",
|
|
|
|
|
"@plane/shared-state",
|
|
|
|
|
"@plane/types",
|
|
|
|
|
"@plane/ui",
|
|
|
|
|
"@plane/utils",
|
2025-03-21 01:51:50 +05:30
|
|
|
],
|
|
|
|
|
},
|
2024-05-21 13:43:54 +05:30
|
|
|
async redirects() {
|
|
|
|
|
return [
|
2025-05-30 18:47:33 +05:30
|
|
|
{
|
|
|
|
|
source: "/:workspaceSlug/projects/:projectId/settings/:path*",
|
|
|
|
|
destination: "/:workspaceSlug/settings/projects/:projectId/:path*",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-06-24 14:17:40 +05:30
|
|
|
{
|
|
|
|
|
source: "/:workspaceSlug/analytics",
|
|
|
|
|
destination: "/:workspaceSlug/analytics/overview",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-05-30 18:47:33 +05:30
|
|
|
{
|
|
|
|
|
source: "/:workspaceSlug/settings/api-tokens",
|
|
|
|
|
destination: "/:workspaceSlug/settings/account/api-tokens",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-05-07 21:19:24 +05:30
|
|
|
{
|
|
|
|
|
source: "/:workspaceSlug/projects/:projectId/inbox",
|
|
|
|
|
destination: "/:workspaceSlug/projects/:projectId/intake",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-05-21 13:43:54 +05:30
|
|
|
{
|
|
|
|
|
source: "/accounts/sign-up",
|
2024-05-22 14:49:06 +05:30
|
|
|
destination: "/sign-up",
|
2024-06-10 12:16:23 +05:30
|
|
|
permanent: true,
|
2024-05-22 14:49:06 +05:30
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: "/sign-in",
|
2024-05-21 13:43:54 +05:30
|
|
|
destination: "/",
|
2024-06-10 12:16:23 +05:30
|
|
|
permanent: true,
|
2024-05-22 17:31:56 +05:30
|
|
|
},
|
2024-08-05 13:37:11 +05:30
|
|
|
{
|
|
|
|
|
source: "/signin",
|
|
|
|
|
destination: "/",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-05-22 17:31:56 +05:30
|
|
|
{
|
|
|
|
|
source: "/register",
|
|
|
|
|
destination: "/sign-up",
|
2024-06-10 12:16:23 +05:30
|
|
|
permanent: true,
|
2024-05-22 17:31:56 +05:30
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: "/login",
|
|
|
|
|
destination: "/",
|
2024-06-10 12:16:23 +05:30
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
];
|
2024-05-21 13:43:54 +05:30
|
|
|
},
|
2024-04-06 17:13:24 +05:30
|
|
|
async rewrites() {
|
2024-08-01 21:08:57 +05:30
|
|
|
const posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://app.posthog.com";
|
2024-05-10 02:32:42 +05:30
|
|
|
const rewrites = [
|
2024-04-06 17:13:24 +05:30
|
|
|
{
|
|
|
|
|
source: "/ingest/static/:path*",
|
2024-05-28 13:08:37 +05:30
|
|
|
destination: `${posthogHost}/static/:path*`,
|
2024-04-06 17:13:24 +05:30
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: "/ingest/:path*",
|
2024-05-28 13:08:37 +05:30
|
|
|
destination: `${posthogHost}/:path*`,
|
2024-04-06 17:13:24 +05:30
|
|
|
},
|
2024-05-08 23:01:20 +05:30
|
|
|
];
|
2024-05-10 02:32:42 +05:30
|
|
|
if (process.env.NEXT_PUBLIC_ADMIN_BASE_URL || process.env.NEXT_PUBLIC_ADMIN_BASE_PATH) {
|
2024-06-10 12:16:23 +05:30
|
|
|
const ADMIN_BASE_URL = process.env.NEXT_PUBLIC_ADMIN_BASE_URL || "";
|
|
|
|
|
const ADMIN_BASE_PATH = process.env.NEXT_PUBLIC_ADMIN_BASE_PATH || "";
|
|
|
|
|
const GOD_MODE_BASE_URL = ADMIN_BASE_URL + ADMIN_BASE_PATH;
|
2024-05-24 20:04:00 +05:30
|
|
|
rewrites.push({
|
|
|
|
|
source: "/god-mode",
|
|
|
|
|
destination: `${GOD_MODE_BASE_URL}/`,
|
2024-08-01 21:08:57 +05:30
|
|
|
});
|
2024-05-10 02:32:42 +05:30
|
|
|
rewrites.push({
|
|
|
|
|
source: "/god-mode/:path*",
|
|
|
|
|
destination: `${GOD_MODE_BASE_URL}/:path*`,
|
2024-06-10 12:16:23 +05:30
|
|
|
});
|
2024-05-10 02:32:42 +05:30
|
|
|
}
|
|
|
|
|
return rewrites;
|
2024-05-08 23:01:20 +05:30
|
|
|
},
|
2022-11-19 19:51:26 +05:30
|
|
|
};
|
|
|
|
|
|
2025-01-07 00:37:40 +05:30
|
|
|
module.exports = nextConfig;
|