44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
|
import { fileURLToPath } from 'url';
|
||
|
import path from 'path';
|
||
|
import createNextIntlPlugin from 'next-intl/plugin';
|
||
|
|
||
|
const withNextIntl = createNextIntlPlugin();
|
||
|
|
||
|
/** @type {import('next').NextConfig} */
|
||
|
const nextConfig = {
|
||
|
images: {
|
||
|
formats: ["image/avif", "image/webp"],
|
||
|
remotePatterns: [
|
||
|
{
|
||
|
protocol: "https",
|
||
|
hostname: "typeframes.ai",
|
||
|
port: "",
|
||
|
pathname: "/_next/image/**",
|
||
|
},
|
||
|
],
|
||
|
domains: ['www.typeframes.com'], // 允许从该域名加载图片资源
|
||
|
|
||
|
},
|
||
|
sassOptions: {
|
||
|
includePaths: [path.join(path.dirname(fileURLToPath(import.meta.url)), 'styles')],
|
||
|
},
|
||
|
async rewrites() {
|
||
|
return [
|
||
|
{
|
||
|
source: '/api/:path*',
|
||
|
destination: 'https://www.typeframes.cc/api/:path*/',
|
||
|
},
|
||
|
{
|
||
|
source: '/oauth2callback/:path*',
|
||
|
destination: 'https://www.typeframes.cc/oauth2callback/:path*/',
|
||
|
},
|
||
|
{
|
||
|
source: '/google/:path*',
|
||
|
destination: 'https://www.typeframes.cc/google/:path*/',
|
||
|
},
|
||
|
];
|
||
|
},
|
||
|
};
|
||
|
|
||
|
export default withNextIntl(nextConfig);
|