better-auth/apps/web/next.config.ts
 Илья Шалонин 8538ab969a first
2025-10-29 13:43:43 +05:00

56 lines
1.2 KiB
TypeScript

import { withContentCollections } from "@content-collections/next";
import type { NextConfig } from "next";
import nextIntlPlugin from "next-intl/plugin";
const withNextIntl = nextIntlPlugin("./modules/i18n/request.ts");
const nextConfig: NextConfig = {
transpilePackages: ["@repo/api", "@repo/auth", "@repo/database"],
images: {
remotePatterns: [
{
// vk profile images
protocol: "https",
hostname: "vk.com",
},
{
// github profile images
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
],
},
async redirects() {
return [
{
source: "/app/settings",
destination: "/app/settings/general",
permanent: true,
},
{
source: "/app/:organizationSlug/settings",
destination: "/app/:organizationSlug/settings/general",
permanent: true,
},
{
source: "/app/admin",
destination: "/app/admin/users",
permanent: true,
},
];
},
eslint: {
ignoreDuringBuilds: true,
},
webpack: (config, { webpack }) => {
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /^pg-native$|^cloudflare:sockets$/,
}),
);
return config;
},
};
export default withContentCollections(withNextIntl(nextConfig));