MicProtocol / apps /admin /next.config.js
Benaah's picture
Upload folder using huggingface_hub
fecff63 verified
Raw History Blame Contribute Delete
1.01 kB
/** @type {import('next').NextConfig} */
const path = require("path");
const nextConfig = {
reactStrictMode: true,
transpilePackages: ["@micprotocol/shared-types", "@micprotocol/ui"],
output: process.env.DOCKER_BUILD ? "standalone" : undefined,
poweredByHeader: false,
compress: true,
// Admin never uses Prisma at runtime; @micprotocol/api is imported as
// `import type` (erased at compile time). Skip type-checking in Docker
// builds since the Prisma generated client isn't available in this image.
typescript: process.env.DOCKER_BUILD ? { ignoreBuildErrors: true } : undefined,
turbopack: {
root: path.resolve(__dirname, "../.."),
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${process.env.API_URL || "http://localhost:4000"}/api/:path*`,
},
{
source: "/trpc/:path*",
destination: `${process.env.API_URL || "http://localhost:4000"}/trpc/:path*`,
},
];
},
};
module.exports = nextConfig;