Updated dependencies for Supabase-js from version 2.43.0 to 2.43.1 and Sentry from various 7.112.2 versions to 7.113.0. It was necessary to ensure compatibility, bug fixes, and to benefit from new features and improvements.
95 lines
2.1 KiB
JavaScript
95 lines
2.1 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;
|
|
|
|
const INTERNAL_PACKAGES = [
|
|
'@kit/ui',
|
|
'@kit/auth',
|
|
'@kit/accounts',
|
|
'@kit/admin',
|
|
'@kit/team-accounts',
|
|
'@kit/shared',
|
|
'@kit/supabase',
|
|
'@kit/i18n',
|
|
'@kit/mailers',
|
|
'@kit/billing-gateway',
|
|
'@kit/email-templates',
|
|
'@kit/database-webhooks',
|
|
'@kit/cms',
|
|
'@kit/monitoring',
|
|
'@kit/next',
|
|
'@kit/notifications',
|
|
];
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const config = {
|
|
reactStrictMode: true,
|
|
/** Enables hot reloading for local packages without a build step */
|
|
transpilePackages: INTERNAL_PACKAGES,
|
|
images: {
|
|
remotePatterns: getRemotePatterns(),
|
|
},
|
|
experimental: {
|
|
mdxRs: true,
|
|
taint: true,
|
|
instrumentationHook: true,
|
|
turbo: {
|
|
resolveExtensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
},
|
|
// needed for supporting dynamic imports for local content
|
|
outputFileTracingIncludes: {
|
|
'/*': ['./content/**/*'],
|
|
},
|
|
optimizePackageImports: [
|
|
'recharts',
|
|
'lucide-react',
|
|
'@radix-ui/react-icons',
|
|
'@radix-ui/react-avatar',
|
|
'@radix-ui/react-select',
|
|
'date-fns',
|
|
...INTERNAL_PACKAGES,
|
|
],
|
|
},
|
|
modularizeImports: {
|
|
lodash: {
|
|
transform: 'lodash/{{member}}',
|
|
},
|
|
},
|
|
/** 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() {
|
|
/** @type {import('next').NextConfig['remotePatterns']} */
|
|
// 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',
|
|
},
|
|
{
|
|
protocol: 'http',
|
|
hostname: 'localhost',
|
|
},
|
|
];
|
|
}
|