diff --git a/next.config.js b/next.config.js index 45e61106..192e9f31 100644 --- a/next.config.js +++ b/next.config.js @@ -2,7 +2,11 @@ * @type {import('next').NextConfig} */ -const nextConfig = { +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}); + +const nextConfig = withBundleAnalyzer({ output: 'export', swcMinify: false, images: { @@ -19,6 +23,6 @@ const nextConfig = { config.experiments = { ...config.experiments, topLevelAwait: true }; return config; }, -}; +}); module.exports = nextConfig; diff --git a/package.json b/package.json index d6d7fe48..9876fec7 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "ws": "^8.13.0" }, "devDependencies": { + "@next/bundle-analyzer": "^13.3.0", "@tailwindcss/typography": "^0.5.9", "@tauri-apps/cli": "^1.2.3", "@trivago/prettier-plugin-sort-imports": "^4.1.1", @@ -55,6 +56,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "autoprefixer": "^10.4.14", + "cross-env": "^7.0.3", "csstype": "^3.1.2", "encoding": "^0.1.13", "eslint": "^8.38.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e27a6bf2..37251878 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,6 +3,7 @@ lockfileVersion: 5.4 specifiers: '@emoji-mart/data': ^1.1.2 '@emoji-mart/react': ^1.1.1 + '@next/bundle-analyzer': ^13.3.0 '@radix-ui/react-alert-dialog': ^1.0.3 '@radix-ui/react-collapsible': ^1.0.2 '@radix-ui/react-dialog': ^1.0.3 @@ -22,6 +23,7 @@ specifiers: '@typescript-eslint/eslint-plugin': ^5.59.0 '@typescript-eslint/parser': ^5.59.0 autoprefixer: ^10.4.14 + cross-env: ^7.0.3 csstype: ^3.1.2 dayjs: ^1.11.7 destr: ^1.2.2 @@ -89,6 +91,7 @@ dependencies: ws: 8.13.0 devDependencies: + '@next/bundle-analyzer': 13.3.0 '@tailwindcss/typography': 0.5.9_tailwindcss@3.3.1 '@tauri-apps/cli': 1.2.3 '@trivago/prettier-plugin-sort-imports': 4.1.1_prettier@2.8.7 @@ -98,6 +101,7 @@ devDependencies: '@typescript-eslint/eslint-plugin': 5.59.0_fdxyi3g57a6lyb5rx36h2olw2q '@typescript-eslint/parser': 5.59.0_ze6bmax3gcsfve3yrzu6npguhe autoprefixer: 10.4.14_postcss@8.4.22 + cross-env: 7.0.3 csstype: 3.1.2 encoding: 0.1.13 eslint: 8.38.0 @@ -419,6 +423,16 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@next/bundle-analyzer/13.3.0: + resolution: + { integrity: sha512-MNtsx3MFh/kqq2DDa4ladjzfUV8McncEowNvt/s7Z9UjvX6DkuJGFRdjq/RYtxWvjQAsDgiOsgyIOLzDbvQo3g== } + dependencies: + webpack-bundle-analyzer: 4.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /@next/env/13.3.1-canary.16: resolution: { integrity: sha512-ISKW7FIAcP5r0Htl6g6+mOtCMI4S/qI1SyV9hWR1fUOYxk/d+8F7ZTEL5sHjccilj3UT9YDn9DwX4wnINsrLpw== } @@ -568,6 +582,11 @@ packages: tslib: 2.5.0 dev: true + /@polka/url/1.0.0-next.21: + resolution: + { integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== } + dev: true + /@radix-ui/primitive/1.0.0: resolution: { integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA== } @@ -1516,6 +1535,12 @@ packages: acorn: 8.8.2 dev: true + /acorn-walk/8.2.0: + resolution: + { integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== } + engines: { node: '>=0.4.0' } + dev: true + /acorn/8.8.2: resolution: { integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== } @@ -1928,11 +1953,26 @@ packages: engines: { node: '>= 6' } dev: true + /commander/7.2.0: + resolution: + { integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== } + engines: { node: '>= 10' } + dev: true + /concat-map/0.0.1: resolution: { integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== } dev: true + /cross-env/7.0.3: + resolution: + { integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== } + engines: { node: '>=10.14', npm: '>=6', yarn: '>=1' } + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dev: true + /cross-fetch/3.1.5_encoding@0.1.13: resolution: { integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== } @@ -2111,6 +2151,11 @@ packages: esutils: 2.0.3 dev: true + /duplexer/0.1.2: + resolution: + { integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== } + dev: true + /eastasianwidth/0.2.0: resolution: { integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== } @@ -2913,6 +2958,14 @@ packages: { integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== } dev: true + /gzip-size/6.0.0: + resolution: + { integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== } + engines: { node: '>=10' } + dependencies: + duplexer: 0.1.2 + dev: true + /has-bigints/1.0.2: resolution: { integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== } @@ -3544,6 +3597,12 @@ packages: { integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== } dev: true + /mrmime/1.0.1: + resolution: + { integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== } + engines: { node: '>=10' } + dev: true + /ms/2.0.0: resolution: { integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== } @@ -3815,6 +3874,12 @@ packages: is-wsl: 2.2.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== } @@ -4406,6 +4471,16 @@ packages: { 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 + /slash/3.0.0: resolution: { integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== } @@ -4727,6 +4802,12 @@ packages: is-number: 7.0.0 dev: true + /totalist/1.1.0: + resolution: + { integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== } + engines: { node: '>=6' } + dev: true + /tr46/0.0.3: resolution: { integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== } @@ -4921,6 +5002,26 @@ packages: { integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== } dev: false + /webpack-bundle-analyzer/4.7.0: + resolution: + { integrity: sha512-j9b8ynpJS4K+zfO5GGwsAcQX4ZHpWV+yRiHDiL+bE0XHJ8NiPYLTNVQdlFYWxtpg9lfAQNlwJg16J9AJtFSXRg== } + engines: { node: '>= 10.13.0' } + hasBin: true + dependencies: + acorn: 8.8.2 + acorn-walk: 8.2.0 + chalk: 4.1.2 + commander: 7.2.0 + 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 + /websocket/1.0.34: resolution: { integrity: sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== } @@ -5018,6 +5119,20 @@ packages: { integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== } dev: true + /ws/7.5.9: + resolution: + { integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== } + engines: { node: '>=8.3.0' } + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /ws/8.13.0: resolution: { integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== }