Skip to content

Commit ae1c19b

Browse files
committed
use the new analyzer
1 parent 875e135 commit ae1c19b

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

apps/mvp/next.config.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import type {NextConfig} from 'next'
2-
import {createRequire} from 'node:module'
3-
import path from 'node:path'
42

5-
import withBundleAnalyzer from '@next/bundle-analyzer'
6-
7-
const require = createRequire(import.meta.url)
83

94
const nextConfig: NextConfig = {
105
// basePath: process.env.NEXT_PUBLIC_TEST_BASE_PATH,
@@ -16,19 +11,6 @@ const nextConfig: NextConfig = {
1611
},
1712
},
1813
productionBrowserSourceMaps: true,
19-
webpack: (config) => {
20-
// Resolve sanity package duplicates by forcing all imports to use the same version
21-
config.resolve.alias = {
22-
...config.resolve.alias,
23-
// Force all sanity imports to use a single resolved version
24-
'sanity$': require.resolve('sanity'),
25-
'sanity/*': path.resolve(require.resolve('sanity'), '..', '*'),
26-
}
27-
28-
return config
29-
},
3014
}
3115

32-
export default withBundleAnalyzer({
33-
enabled: process.env.ANALYZE === 'true',
34-
})(nextConfig)
16+
export default nextConfig

apps/mvp/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"#groqd": "./groqd-client.ts"
88
},
99
"scripts": {
10-
"build": "next build --profile --webpack && sanity manifest extract --path public/studio/static && pnpm copy-analyze",
11-
"copy-analyze": "cp -r .next/analyze public/ || true",
10+
"build": "next build --profile --experimental-analyze && sanity manifest extract --path public/studio/static",
1211
"dev": "next dev",
1312
"start": "next start",
1413
"type-check": "next typegen && tsc --noEmit",
@@ -27,7 +26,6 @@
2726
"sanity": "catalog:"
2827
},
2928
"devDependencies": {
30-
"@next/bundle-analyzer": "catalog:",
3129
"@next/env": "catalog:",
3230
"@repo/typescript-config": "workspace:*",
3331
"@tailwindcss/postcss": "^4.1.17",

0 commit comments

Comments
 (0)