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));