mirror of
https://github.com/beilunyang/moemail.git
synced 2025-10-05 07:26:54 +08:00
31 lines
629 B
TypeScript
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);
|