chore: add nextjs bundle analyzer
This commit is contained in:
parent
c575db78c1
commit
f9477b9bdc
|
|
@ -2,6 +2,9 @@
|
|||
const pkg = require("./package.json")
|
||||
const spawn = require("cross-spawn")
|
||||
const { withIpfsGateway } = require("@crossbell/ipfs-gateway-next")
|
||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
})
|
||||
|
||||
class UnoCSS {
|
||||
/**
|
||||
|
|
@ -23,21 +26,23 @@ class UnoCSS {
|
|||
}
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
module.exports = withIpfsGateway({
|
||||
env: {
|
||||
APP_DESCRIPTION: pkg.description,
|
||||
},
|
||||
experimental: {
|
||||
scrollRestoration: true,
|
||||
outputStandalone: true,
|
||||
},
|
||||
module.exports = withBundleAnalyzer(
|
||||
withIpfsGateway({
|
||||
env: {
|
||||
APP_DESCRIPTION: pkg.description,
|
||||
},
|
||||
experimental: {
|
||||
scrollRestoration: true,
|
||||
},
|
||||
output: "standalone",
|
||||
|
||||
webpack(config) {
|
||||
config.plugins.push(new UnoCSS())
|
||||
return config
|
||||
},
|
||||
webpack(config) {
|
||||
config.plugins.push(new UnoCSS())
|
||||
return config
|
||||
},
|
||||
|
||||
ipfsGateway: {
|
||||
gatewayPath: "/_ipfs/:cid/:pathToResource*",
|
||||
},
|
||||
})
|
||||
ipfsGateway: {
|
||||
gatewayPath: "/_ipfs/:cid/:pathToResource*",
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
"@iconify-json/carbon": "^1.1.8",
|
||||
"@iconify-json/fluent": "^1.1.16",
|
||||
"@iconify-json/mdi": "^1.1.33",
|
||||
"@next/bundle-analyzer": "^12.3.1",
|
||||
"@playwright/test": "^1.26.0",
|
||||
"@types/async-busboy": "^1.1.1",
|
||||
"@types/busboy": "^1.5.0",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ specifiers:
|
|||
'@iconify-json/mdi': ^1.1.33
|
||||
'@iconify-json/tabler': ^1.1.35
|
||||
'@monaco-editor/react': ^4.4.5
|
||||
'@next/bundle-analyzer': ^12.3.1
|
||||
'@playwright/test': ^1.26.0
|
||||
'@proselog/jwt': ^0.1.1
|
||||
'@rainbow-me/rainbowkit': ^0.6.1
|
||||
|
|
@ -202,6 +203,7 @@ devDependencies:
|
|||
'@iconify-json/carbon': 1.1.8
|
||||
'@iconify-json/fluent': 1.1.16
|
||||
'@iconify-json/mdi': 1.1.33
|
||||
'@next/bundle-analyzer': 12.3.1
|
||||
'@playwright/test': 1.26.0
|
||||
'@types/async-busboy': 1.1.1
|
||||
'@types/busboy': 1.5.0
|
||||
|
|
@ -1593,6 +1595,15 @@ packages:
|
|||
murmurhash3js-revisited: 3.0.0
|
||||
dev: false
|
||||
|
||||
/@next/bundle-analyzer/12.3.1:
|
||||
resolution: {integrity: sha512-2f/eei0YqZZBMTs4g1+HbgHyAFH5MbI/w9wLXmE8ly9SFze2D40sRH46JcC//EFVM/TIynVBh5sxn9CVO/vtxg==}
|
||||
dependencies:
|
||||
webpack-bundle-analyzer: 4.3.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/@next/env/12.3.1:
|
||||
resolution: {integrity: sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==}
|
||||
|
||||
|
|
@ -3024,6 +3035,11 @@ packages:
|
|||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/acorn-walk/8.2.0:
|
||||
resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/acorn/7.4.1:
|
||||
resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
|
|
@ -3811,6 +3827,11 @@ packages:
|
|||
/commander/2.20.3:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
|
||||
/commander/6.2.1:
|
||||
resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==}
|
||||
engines: {node: '>= 6'}
|
||||
dev: true
|
||||
|
||||
/commander/9.4.0:
|
||||
resolution: {integrity: sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==}
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
|
|
@ -6922,7 +6943,6 @@ packages:
|
|||
|
||||
/lodash/4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
dev: false
|
||||
|
||||
/log-update/4.0.0:
|
||||
resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==}
|
||||
|
|
@ -7839,6 +7859,11 @@ packages:
|
|||
mimic-fn: 4.0.0
|
||||
dev: true
|
||||
|
||||
/opener/1.5.2:
|
||||
resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/optionator/0.9.1:
|
||||
resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
|
@ -8953,6 +8978,15 @@ packages:
|
|||
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||
dev: true
|
||||
|
||||
/sirv/1.0.19:
|
||||
resolution: {integrity: sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==}
|
||||
engines: {node: '>= 10'}
|
||||
dependencies:
|
||||
'@polka/url': 1.0.0-next.21
|
||||
mrmime: 1.0.1
|
||||
totalist: 1.1.0
|
||||
dev: true
|
||||
|
||||
/sirv/2.0.2:
|
||||
resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==}
|
||||
engines: {node: '>= 10'}
|
||||
|
|
@ -9433,6 +9467,11 @@ packages:
|
|||
resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==}
|
||||
dev: false
|
||||
|
||||
/totalist/1.1.0:
|
||||
resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/totalist/3.0.0:
|
||||
resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==}
|
||||
engines: {node: '>=6'}
|
||||
|
|
@ -10121,6 +10160,25 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/webpack-bundle-analyzer/4.3.0:
|
||||
resolution: {integrity: sha512-J3TPm54bPARx6QG8z4cKBszahnUglcv70+N+8gUqv2I5KOFHJbzBiLx+pAp606so0X004fxM7hqRu10MLjJifA==}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
acorn: 8.8.0
|
||||
acorn-walk: 8.2.0
|
||||
chalk: 4.1.2
|
||||
commander: 6.2.1
|
||||
gzip-size: 6.0.0
|
||||
lodash: 4.17.21
|
||||
opener: 1.5.2
|
||||
sirv: 1.0.19
|
||||
ws: 7.5.9
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/webpack-sources/3.2.3:
|
||||
resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
|
@ -10306,7 +10364,6 @@ packages:
|
|||
optional: true
|
||||
utf-8-validate:
|
||||
optional: true
|
||||
dev: false
|
||||
|
||||
/ws/8.9.0_22kvxa7zeyivx4jp72v2w3pkvy:
|
||||
resolution: {integrity: sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==}
|
||||
|
|
|
|||
Loading…
Reference in New Issue