diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 49334ab6c..69614456a 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -2,6 +2,7 @@ import path, { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import env from './src/config/env.mjs'; import { withPostHogConfig } from '@posthog/nextjs-config'; +import withBundleAnalyzer from '@next/bundle-analyzer'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); @@ -146,17 +147,6 @@ const nextConfig = { } }; -// export default withBundleAnalyzer({ -// enabled: process.env.ANALYZE === 'true' -// })(nextConfig); - -// export default withPostHogConfig(nextConfig, { -// enabled: -// !!process.env.POSTHOG_API_KEY && -// !!process.env.POSTHOG_ENV_ID && -// process.env.POSTHOG_API_KEY !== 'undefined', -// personalApiKey: process.env.POSTHOG_API_KEY, -// envId: process.env.POSTHOG_ENV_ID -// }); - -export default nextConfig; +export default withBundleAnalyzer({ + enabled: process.env.ANALYZE === 'true' +})(nextConfig); diff --git a/apps/web/src/components/ui/buttons/index.ts b/apps/web/src/components/ui/buttons/index.ts index e31b4134b..937e3845c 100644 --- a/apps/web/src/components/ui/buttons/index.ts +++ b/apps/web/src/components/ui/buttons/index.ts @@ -1,2 +1,2 @@ -export * from './BackButton'; -export * from './Button'; +export { BackButton } from './BackButton'; +export { Button, type ButtonProps } from './Button'; diff --git a/apps/web/src/components/ui/charts/BusterChartComponent.tsx b/apps/web/src/components/ui/charts/BusterChartComponent.tsx index aaeb078c7..7b5d1f541 100644 --- a/apps/web/src/components/ui/charts/BusterChartComponent.tsx +++ b/apps/web/src/components/ui/charts/BusterChartComponent.tsx @@ -1,6 +1,6 @@ import type React from 'react'; import { useMemo } from 'react'; -import { BusterChartJS } from './BusterChartJS'; +import { BusterChartJSDynamic } from './BusterChartJSDynamic'; import { useDatasetOptions } from './chartHooks'; import type { BusterChartComponentProps, @@ -72,5 +72,5 @@ export const BusterChartComponent: React.FC = ( ] ); - return ; + return ; }; diff --git a/apps/web/src/components/ui/charts/BusterChartJS/index.ts b/apps/web/src/components/ui/charts/BusterChartJS/index.ts index e48f85139..0b394769c 100644 --- a/apps/web/src/components/ui/charts/BusterChartJS/index.ts +++ b/apps/web/src/components/ui/charts/BusterChartJS/index.ts @@ -1 +1 @@ -export * from './BusterChartJS'; +export { BusterChartJS } from './BusterChartJS'; diff --git a/apps/web/src/components/ui/charts/BusterChartJSDynamic.tsx b/apps/web/src/components/ui/charts/BusterChartJSDynamic.tsx new file mode 100644 index 000000000..244d860b6 --- /dev/null +++ b/apps/web/src/components/ui/charts/BusterChartJSDynamic.tsx @@ -0,0 +1,10 @@ +import dynamic from 'next/dynamic'; +import { CircleSpinnerLoaderContainer } from '../loaders'; + +export const BusterChartJSDynamic = dynamic( + () => import('./BusterChartJS/BusterChartJS').then((mod) => ({ default: mod.BusterChartJS })), + { + ssr: false, + loading: () => + } +); diff --git a/apps/web/src/components/ui/icons/index.ts b/apps/web/src/components/ui/icons/index.ts index 1b2e238ea..34656f41e 100644 --- a/apps/web/src/components/ui/icons/index.ts +++ b/apps/web/src/components/ui/icons/index.ts @@ -1 +1,17 @@ -export * from './NucleoIconOutlined'; +export { + Copy, + Check3 as Check, + ChevronDown, + ChevronUp, + ArrowUp, + ArrowRight, + ArrowUpRight, + HouseModern, + MapSettings, + User, + Window, + WindowAlert, + WindowSettings, + WindowUser, + WindowEdit +} from './NucleoIconOutlined'; diff --git a/apps/web/src/components/ui/modal/index.ts b/apps/web/src/components/ui/modal/index.ts index fbed2190b..313bbfce2 100644 --- a/apps/web/src/components/ui/modal/index.ts +++ b/apps/web/src/components/ui/modal/index.ts @@ -1 +1 @@ -export * from './AppModal'; +export { AppModal, type ModalProps } from './AppModal';