Files
moemail/next.config.ts
beilunyang cc7e5003c5 feat: Init
2024-12-16 01:49:50 +08:00

31 lines
629 B
TypeScript

import type { NextConfig } from "next";
import withPWA from 'next-pwa'
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
async function setup() {
if (process.env.NODE_ENV === 'development') {
await setupDevPlatform()
}
}
setup()
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
},
],
},
};
export default withPWA({
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
// @ts-expect-error "ignore the error"
})(nextConfig);