Perf improvements and billing updates
This commit is contained in:
@@ -3,35 +3,49 @@ 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/team-accounts',
|
||||
'@kit/shared',
|
||||
'@kit/supabase',
|
||||
'@kit/i18n',
|
||||
'@kit/mailers',
|
||||
'@kit/billing',
|
||||
'@kit/billing-gateway',
|
||||
'@kit/stripe',
|
||||
];
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: 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',
|
||||
'@kit/stripe',
|
||||
],
|
||||
transpilePackages: INTERNAL_PACKAGES,
|
||||
pageExtensions: ['ts', 'tsx'],
|
||||
images: {
|
||||
remotePatterns: getRemotePatterns(),
|
||||
},
|
||||
experimental: {
|
||||
mdxRs: true,
|
||||
optimizePackageImports: []
|
||||
optimizePackageImports: [
|
||||
'recharts',
|
||||
'lucide-react',
|
||||
'@radix-ui/react-icons',
|
||||
'@radix-ui/react-avatar',
|
||||
'@radix-ui/react-select',
|
||||
'date-fns',
|
||||
...INTERNAL_PACKAGES,
|
||||
],
|
||||
},
|
||||
modularizeImports: {
|
||||
"lucide-react": {
|
||||
transform: "lucide-react/dist/esm/icons/{{ kebabCase member }}",
|
||||
}
|
||||
'lucide-react': {
|
||||
transform: 'lucide-react/dist/esm/icons/{{ kebabCase member }}',
|
||||
},
|
||||
lodash: {
|
||||
transform: 'lodash/{{member}}',
|
||||
},
|
||||
},
|
||||
/** We already do linting and typechecking as separate tasks in CI */
|
||||
eslint: { ignoreDuringBuilds: true },
|
||||
|
||||
Reference in New Issue
Block a user