Files
DefectingCat.github.io/next.config.mjs
DefectingCat dcec7044c7 Switch runtime to edge
Format code
2022-11-01 11:44:44 +08:00

31 lines
740 B
JavaScript

/**
* @type {import('next').NextConfig}
*/
const isExport = process.env.NEXT_BUILD === 'export';
const nextConfig = {
/* config options here */
reactStrictMode: true,
swcMinify: true,
output: 'standalone',
images: isExport ? { unoptimized: true } : {},
experimental: {
runtime: 'experimental-edge',
largePageDataBytes: 512 * 1000,
},
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
// assetPrefix: isExport ? './' : undefined,
// images:
// process.env.NEXT_BUILD === 'export'
// ? {
// loader: 'imgix',
// path: 'https://rua.plus/',
// }
// : {},
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
};
export default nextConfig;