// @ts-check
import { redirect } from "next/dist/server/api-utils/index.js";
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
*/
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env/server.mjs"));
/**
* Don't be scared of the generics here.
* All they do is to give us autocompletion when using this.
* @template {import('next').NextConfig} T
* @constraint {{import('next').NextConfig}}
* @param {{reactStrictMode?: boolean;swcMinify?: boolean;output?: string;images?: {domains: string[];};i18n?: {locales: string[];defaultLocale: string;};webpack?: any;}} nextConfig
*/
function defineNextConfig(nextConfig) {
const webpack = nextConfig.webpack
nextConfig.webpack = (
/** @type {{ module: { rules: { test: RegExp; issuer: RegExp; use: string[]; }[]; }; }} */
config,
/** @type {any} */
options) => {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
// Preserve custom webpack config
return typeof webpack === "function" ? webpack(config, options) : config
};
return nextConfig;
}
export default defineNextConfig({
reactStrictMode: true,
swcMinify: true,
output: "standalone",
images: {
domains: ['cdn.discordapp.com'],
},
i18n: {
locales: ["en"],
defaultLocale: "en",
},
});
// @ts-check
import { redirect } from "next/dist/server/api-utils/index.js";
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
*/
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env/server.mjs"));
/**
* Don't be scared of the generics here.
* All they do is to give us autocompletion when using this.
* @template {import('next').NextConfig} T
* @constraint {{import('next').NextConfig}}
* @param {{reactStrictMode?: boolean;swcMinify?: boolean;output?: string;images?: {domains: string[];};i18n?: {locales: string[];defaultLocale: string;};webpack?: any;}} nextConfig
*/
function defineNextConfig(nextConfig) {
const webpack = nextConfig.webpack
nextConfig.webpack = (
/** @type {{ module: { rules: { test: RegExp; issuer: RegExp; use: string[]; }[]; }; }} */
config,
/** @type {any} */
options) => {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
// Preserve custom webpack config
return typeof webpack === "function" ? webpack(config, options) : config
};
return nextConfig;
}
export default defineNextConfig({
reactStrictMode: true,
swcMinify: true,
output: "standalone",
images: {
domains: ['cdn.discordapp.com'],
},
i18n: {
locales: ["en"],
defaultLocale: "en",
},
});