Files
myeasycms-v2/apps/web/next.config.mjs
giancarlo 95793c42b4 Remove admin functionality related code
The admin functionality related code has been removed which includes various user and organization functionalities like delete, update, ban etc. This includes action logic, UI components and supportive utility functions. Notable deletions include the server action files, dialog components for actions like banning and deleting, and related utility functions. This massive cleanup is aimed at simplifying the codebase and the commit reflects adherence to project restructuring.
2024-03-25 15:40:43 +08:00

59 lines
1.3 KiB
JavaScript

import withBundleAnalyzer from '@next/bundle-analyzer';
const IS_PRODUCTION = process.env.NODE_ENV === 'production';
const SUPABASE_URL = process.env.NEXT_PUBLIC_SUPABASE_URL;
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
/** Enables hot reloading for local packages without a build step */
transpilePackages: [
'@kit/ui',
'@kit/auth',
'@kit/accounts',
'@kit/team-accounts',
'@kit/shared',
'@kit/supabase',
'@kit/i18n',
'@kit/mailers',
'@kit/billing',
'@kit/billing-gateway',
],
pageExtensions: ['ts', 'tsx'],
images: {
remotePatterns: getRemotePatterns(),
},
experimental: {
mdxRs: true,
},
/** We already do linting and typechecking as separate tasks in CI */
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
};
export default withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})(config);
function getRemotePatterns() {
// add here the remote patterns for your images
const remotePatterns = [];
if (SUPABASE_URL) {
const hostname = new URL(SUPABASE_URL).hostname;
remotePatterns.push({
protocol: 'https',
hostname,
});
}
return IS_PRODUCTION
? remotePatterns
: [
{
protocol: 'http',
hostname: '127.0.0.1',
},
];
}