mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore(docs): bundle analyzer
This commit is contained in:
1 parent
6189cfa12d
commit
de1634a4a9
3 files changed
+26
-11
No files matched your search
@@ -6,6 +6,12 @@ import rehypeSlug from 'rehype-slug'
|
||||
|
||||
import withTM from 'next-transpile-modules'
|
||||
import withYaml from 'next-plugin-yaml'
|
||||
import configureBundleAnalyzer from '@next/bundle-analyzer'
|
||||
|
||||
const withBundleAnalyzer = configureBundleAnalyzer({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
})
|
||||
|
||||
// import admonitions from 'remark-admonitions'
|
||||
|
||||
// import { remarkCodeHike } from '@code-hike/mdx'
|
||||
@@ -92,9 +98,14 @@ const nextConfig = {
|
||||
},
|
||||
}
|
||||
|
||||
// next.config.js
|
||||
export default () => {
|
||||
// const plugins = [withMDX]/
|
||||
const plugins = [withTM(['ui', 'common', '@supabase/auth-helpers-nextjs']), withMDX, withYaml]
|
||||
const configExport = () => {
|
||||
const plugins = [
|
||||
withTM(['ui', 'common', '@supabase/auth-helpers-nextjs']),
|
||||
withMDX,
|
||||
withYaml,
|
||||
withBundleAnalyzer,
|
||||
]
|
||||
return plugins.reduce((acc, next) => next(acc), nextConfig)
|
||||
}
|
||||
|
||||
export default configExport
|
||||
@@ -6,6 +6,7 @@
|
||||
"dev": "next dev --port 3001",
|
||||
"dev:secrets:pull": "AWS_PROFILE=supabase-dev node internals/getSecrets.js",
|
||||
"build": "npm run generate:all && next build",
|
||||
"build:analyze": "ANALYZE=true next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"build:sitemap": "node ./internals/generate-sitemap.mjs",
|
||||
@@ -46,6 +47,7 @@
|
||||
"@docsearch/react": "^3.3.0",
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@next/bundle-analyzer": "^13.4.0",
|
||||
"@next/mdx": "^12.0.4",
|
||||
"@octokit/auth-app": "^4.0.9",
|
||||
"@octokit/core": "^4.2.0",
|
||||
|
||||
Generated
+9
-7
@@ -41,6 +41,7 @@
|
||||
"@docsearch/react": "^3.3.0",
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@next/bundle-analyzer": "^13.4.0",
|
||||
"@next/mdx": "^12.0.4",
|
||||
"@octokit/auth-app": "^4.0.9",
|
||||
"@octokit/core": "^4.2.0",
|
||||
@@ -5267,9 +5268,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/bundle-analyzer": {
|
||||
"version": "13.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-13.2.4.tgz",
|
||||
"integrity": "sha512-bY4Clt7f1roJextpeQOQQWfNiXI0O5UvfOEyfuM5YUGPQMOCAZD2zjLjolakdn9Dm2yyMQUQ6JDE+iJK0dIeLA==",
|
||||
"version": "13.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-13.4.0.tgz",
|
||||
"integrity": "sha512-3ni7Ple1By7RNk2MB/y4CC4aFJuyI2mYSRxDo8n5VckVJeLVasmmmvzdN45dKzgs8AHu3dPWIsS3+2NJKMyU+A==",
|
||||
"dependencies": {
|
||||
"webpack-bundle-analyzer": "4.7.0"
|
||||
}
|
||||
@@ -43187,9 +43188,9 @@
|
||||
"integrity": "sha512-3fkKj25kEjsfObL6IlKPAlHYPq/oYwUkkQ03zsTTiDjD7vg/RxjdiLeCydqtxHZP0JgsXL3D/X5oAkMGzuUp/Q=="
|
||||
},
|
||||
"@next/bundle-analyzer": {
|
||||
"version": "13.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-13.2.4.tgz",
|
||||
"integrity": "sha512-bY4Clt7f1roJextpeQOQQWfNiXI0O5UvfOEyfuM5YUGPQMOCAZD2zjLjolakdn9Dm2yyMQUQ6JDE+iJK0dIeLA==",
|
||||
"version": "13.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-13.4.0.tgz",
|
||||
"integrity": "sha512-3ni7Ple1By7RNk2MB/y4CC4aFJuyI2mYSRxDo8n5VckVJeLVasmmmvzdN45dKzgs8AHu3dPWIsS3+2NJKMyU+A==",
|
||||
"requires": {
|
||||
"webpack-bundle-analyzer": "4.7.0"
|
||||
}
|
||||
@@ -51526,6 +51527,7 @@
|
||||
"@docsearch/react": "^3.3.0",
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@next/bundle-analyzer": "^13.4.0",
|
||||
"@next/mdx": "^12.0.4",
|
||||
"@octokit/auth-app": "^4.0.9",
|
||||
"@octokit/core": "^4.2.0",
|
||||
@@ -68107,7 +68109,7 @@
|
||||
"@types/react": "^17.0.37",
|
||||
"@types/react-copy-to-clipboard": "^5.0.4",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/react-syntax-highlighter": "*",
|
||||
"@types/react-syntax-highlighter": "^15.5.6",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"clsx": "^1.2.1",
|
||||
"cmdk-supabase": "^0.2.2",
|
||||
|
||||
Reference in new issue
Block a user