-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.ts
More file actions
40 lines (35 loc) · 1.02 KB
/
Copy pathnext.config.ts
File metadata and controls
40 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { NextConfig } from "next";
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_API_ENDPOINT;
if (!supabaseUrl) {
throw new Error("NEXT_PUBLIC_SUPABASE_API_ENDPOINT is not configured");
}
const supabaseHostname = new URL(supabaseUrl).hostname;
/** @type {import('next').NextConfig} */
const nextConfig: NextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: supabaseHostname,
pathname: "/storage/v1/object/public/**",
},
],
},
eslint: {
ignoreDuringBuilds: true,
},
trailingSlash: true,
async rewrites() {
return {
fallback: [
{
// Ensure it ignores internal Next.js assets, otherwise everything breaks
source: "/:path((?!_next|api|favicon.ico).*)",
destination: "https://robotics-pec.github.io/:path*",
},
],
}
},
};
export default nextConfig;