hmm
This commit is contained in:
101
next.config.mjs
101
next.config.mjs
@@ -1,52 +1,51 @@
|
||||
import bundleAnalyzer from '@next/bundle-analyzer';
|
||||
|
||||
const withBundleAnalyzer = bundleAnalyzer({ enabled: process.env.ANALYZE === 'true' });
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: 'standalone',
|
||||
reactStrictMode: false,
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "api.telegram.org",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "telegram.org",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "internal-api.inboxi.ng",
|
||||
},
|
||||
],
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'https://internal-api.inboxi.ng/api/:path*',
|
||||
},
|
||||
];
|
||||
},
|
||||
experimental: {
|
||||
serverExternalPackages: [],
|
||||
},
|
||||
// Reduce memory usage during builds
|
||||
onDemandEntries: {
|
||||
// Period (in ms) where the server will keep pages in the buffer
|
||||
maxInactiveAge: 15 * 1000,
|
||||
// Number of pages that should be kept simultaneously without being disposed
|
||||
pagesBufferLength: 2,
|
||||
},
|
||||
// Specify a more efficient build output mode
|
||||
productionBrowserSourceMaps: false,
|
||||
// Skip TypeScript checking during production build to speed up
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
// Skip ESLint checking during production build to speed up
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
const baseConfig = {
|
||||
output: 'standalone',
|
||||
reactStrictMode: false,
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "api.telegram.org",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "telegram.org",
|
||||
},
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "internal-api.inboxi.ng",
|
||||
},
|
||||
],
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'https://internal-api.inboxi.ng/api/:path*',
|
||||
},
|
||||
];
|
||||
},
|
||||
experimental: {
|
||||
serverExternalPackages: [],
|
||||
},
|
||||
onDemandEntries: {
|
||||
maxInactiveAge: 15 * 1000,
|
||||
pagesBufferLength: 2,
|
||||
},
|
||||
productionBrowserSourceMaps: false,
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
};
|
||||
|
||||
const nextConfig = withBundleAnalyzer(baseConfig);
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user