diff --git a/.pnp.cjs b/.pnp.cjs index c802238a..b2c24e5d 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -4160,6 +4160,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@emotion/is-prop-valid", "npm:1.2.1"],\ ["@monorepo/hooks", "virtual:a9e685c95fc9c2c05e15b14465ecc20924383932b7a1aa62172e110ba174ebedc352c8daf5023eb54ef5f0a5595ca6cf8763ef2477e003ebd1850bfb16231d67#workspace:packages/hooks"],\ ["@monorepo/ui", "virtual:8ec4233c825b2c709f2ff549456a05fb98060d621f5df14748cda36fdb51190eccc2e438466f7464c85557cdad97eb73aa6580e78bca957a1149bfc58c6ddf34#workspace:packages/ui"],\ + ["@next/bundle-analyzer", "npm:13.3.5-canary.9"],\ ["@react-hookz/web", "virtual:8ec4233c825b2c709f2ff549456a05fb98060d621f5df14748cda36fdb51190eccc2e438466f7464c85557cdad97eb73aa6580e78bca957a1149bfc58c6ddf34#npm:23.1.0"],\ ["@svgr/cli", "npm:8.1.0"],\ ["@svgr/core", "npm:8.1.0"],\ @@ -4257,6 +4258,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "SOFT"\ }]\ ]],\ + ["@next/bundle-analyzer", [\ + ["npm:13.3.5-canary.9", {\ + "packageLocation": "./.yarn/cache/@next-bundle-analyzer-npm-13.3.5-canary.9-12884ef348-1efa82661e.zip/node_modules/@next/bundle-analyzer/",\ + "packageDependencies": [\ + ["@next/bundle-analyzer", "npm:13.3.5-canary.9"],\ + ["webpack-bundle-analyzer", "npm:4.7.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@next/env", [\ ["npm:13.5.3", {\ "packageLocation": "./.yarn/cache/@next-env-npm-13.5.3-618a3c604c-ebea3bfca1.zip/node_modules/@next/env/",\ @@ -4375,6 +4386,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@polka/url", [\ + ["npm:1.0.0-next.23", {\ + "packageLocation": "./.yarn/cache/@polka-url-npm-1.0.0-next.23-816bf197c2-4b0330de1c.zip/node_modules/@polka/url/",\ + "packageDependencies": [\ + ["@polka/url", "npm:1.0.0-next.23"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@react-hookz/deep-equal", [\ ["npm:1.0.4", {\ "packageLocation": "./.yarn/cache/@react-hookz-deep-equal-npm-1.0.4-8c04a45317-0923e364d3.zip/node_modules/@react-hookz/deep-equal/",\ @@ -5512,6 +5532,24 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["acorn", [\ + ["npm:8.10.0", {\ + "packageLocation": "./.yarn/cache/acorn-npm-8.10.0-2230c9e83e-538ba38af0.zip/node_modules/acorn/",\ + "packageDependencies": [\ + ["acorn", "npm:8.10.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["acorn-walk", [\ + ["npm:8.2.0", {\ + "packageLocation": "./.yarn/cache/acorn-walk-npm-8.2.0-2f2cac3177-1715e76c01.zip/node_modules/acorn-walk/",\ + "packageDependencies": [\ + ["acorn-walk", "npm:8.2.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["agent-base", [\ ["npm:6.0.2", {\ "packageLocation": "./.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip/node_modules/agent-base/",\ @@ -6563,6 +6601,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["duplexer", [\ + ["npm:0.1.2", {\ + "packageLocation": "./.yarn/cache/duplexer-npm-0.1.2-952c810235-62ba61a830.zip/node_modules/duplexer/",\ + "packageDependencies": [\ + ["duplexer", "npm:0.1.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["eastasianwidth", [\ ["npm:0.2.0", {\ "packageLocation": "./.yarn/cache/eastasianwidth-npm-0.2.0-c37eb16bd1-7d00d7cd8e.zip/node_modules/eastasianwidth/",\ @@ -6925,6 +6972,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["gzip-size", [\ + ["npm:6.0.0", {\ + "packageLocation": "./.yarn/cache/gzip-size-npm-6.0.0-d5b52fdbf1-2df97f3596.zip/node_modules/gzip-size/",\ + "packageDependencies": [\ + ["gzip-size", "npm:6.0.0"],\ + ["duplexer", "npm:0.1.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["has", [\ ["npm:1.0.3", {\ "packageLocation": "./.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip/node_modules/has/",\ @@ -7572,6 +7629,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "SOFT"\ }]\ ]],\ + ["mrmime", [\ + ["npm:1.0.1", {\ + "packageLocation": "./.yarn/cache/mrmime-npm-1.0.1-d0aa4f5ddf-cc979da44b.zip/node_modules/mrmime/",\ + "packageDependencies": [\ + ["mrmime", "npm:1.0.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["ms", [\ ["npm:2.1.2", {\ "packageLocation": "./.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip/node_modules/ms/",\ @@ -7830,6 +7896,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["opener", [\ + ["npm:1.5.2", {\ + "packageLocation": "./.yarn/cache/opener-npm-1.5.2-7a1aa69f14-33b620c0d5.zip/node_modules/opener/",\ + "packageDependencies": [\ + ["opener", "npm:1.5.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["p-map", [\ ["npm:4.0.0", {\ "packageLocation": "./.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip/node_modules/p-map/",\ @@ -8598,6 +8673,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["sirv", [\ + ["npm:1.0.19", {\ + "packageLocation": "./.yarn/cache/sirv-npm-1.0.19-2cea3eead6-c943cfc61b.zip/node_modules/sirv/",\ + "packageDependencies": [\ + ["sirv", "npm:1.0.19"],\ + ["@polka/url", "npm:1.0.0-next.23"],\ + ["mrmime", "npm:1.0.1"],\ + ["totalist", "npm:1.1.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["slick-carousel", [\ ["npm:1.8.1", {\ "packageLocation": "./.yarn/cache/slick-carousel-npm-1.8.1-8382d373c2-acaad391e4.zip/node_modules/slick-carousel/",\ @@ -9148,6 +9235,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["totalist", [\ + ["npm:1.1.0", {\ + "packageLocation": "./.yarn/cache/totalist-npm-1.1.0-4e1d9cb01b-dfab80c710.zip/node_modules/totalist/",\ + "packageDependencies": [\ + ["totalist", "npm:1.1.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["tslib", [\ ["npm:2.6.2", {\ "packageLocation": "./.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip/node_modules/tslib/",\ @@ -9309,6 +9405,24 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["webpack-bundle-analyzer", [\ + ["npm:4.7.0", {\ + "packageLocation": "./.yarn/cache/webpack-bundle-analyzer-npm-4.7.0-493ca27caa-4ce3b379c6.zip/node_modules/webpack-bundle-analyzer/",\ + "packageDependencies": [\ + ["webpack-bundle-analyzer", "npm:4.7.0"],\ + ["acorn", "npm:8.10.0"],\ + ["acorn-walk", "npm:8.2.0"],\ + ["chalk", "npm:4.1.2"],\ + ["commander", "npm:7.2.0"],\ + ["gzip-size", "npm:6.0.0"],\ + ["lodash", "npm:4.17.21"],\ + ["opener", "npm:1.5.2"],\ + ["sirv", "npm:1.0.19"],\ + ["ws", "virtual:493ca27caa9730d53796bf46d93d1213703387136db60f7b816041e959d3cb1a62bc13be34a82de626dbd98398e8e9e974646b7441d583184447b1e29d391402#npm:7.5.9"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["which", [\ ["npm:2.0.2", {\ "packageLocation": "./.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip/node_modules/which/",\ @@ -9360,6 +9474,32 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["ws", [\ + ["npm:7.5.9", {\ + "packageLocation": "./.yarn/cache/ws-npm-7.5.9-26f12a5ed6-c3c100a181.zip/node_modules/ws/",\ + "packageDependencies": [\ + ["ws", "npm:7.5.9"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:493ca27caa9730d53796bf46d93d1213703387136db60f7b816041e959d3cb1a62bc13be34a82de626dbd98398e8e9e974646b7441d583184447b1e29d391402#npm:7.5.9", {\ + "packageLocation": "./.yarn/__virtual__/ws-virtual-9849d83d78/0/cache/ws-npm-7.5.9-26f12a5ed6-c3c100a181.zip/node_modules/ws/",\ + "packageDependencies": [\ + ["ws", "virtual:493ca27caa9730d53796bf46d93d1213703387136db60f7b816041e959d3cb1a62bc13be34a82de626dbd98398e8e9e974646b7441d583184447b1e29d391402#npm:7.5.9"],\ + ["@types/bufferutil", null],\ + ["@types/utf-8-validate", null],\ + ["bufferutil", null],\ + ["utf-8-validate", null]\ + ],\ + "packagePeers": [\ + "@types/bufferutil",\ + "@types/utf-8-validate",\ + "bufferutil",\ + "utf-8-validate"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["yallist", [\ ["npm:3.1.1", {\ "packageLocation": "./.yarn/cache/yallist-npm-3.1.1-a568a556b4-48f7bb00dc.zip/node_modules/yallist/",\ diff --git a/apps/jurumarble/next.config.js b/apps/jurumarble/next.config.js index ec553bac..ab626758 100644 --- a/apps/jurumarble/next.config.js +++ b/apps/jurumarble/next.config.js @@ -1,3 +1,7 @@ +const withBundleAnalyzer = require("@next/bundle-analyzer")({ + enabled: process.env.ANALYZE === "true", +}); + /** @type {import('next').NextConfig} */ const nextConfig = { swcMinify: true, @@ -25,4 +29,9 @@ const nextConfig = { }, }; -module.exports = nextConfig; +module.exports = (_phase) => { + const plugins = [withBundleAnalyzer]; + return plugins.reduce((acc, plugin) => plugin(acc), { + ...nextConfig, + }); +}; diff --git a/apps/jurumarble/package.json b/apps/jurumarble/package.json index 03c890d0..7e086985 100644 --- a/apps/jurumarble/package.json +++ b/apps/jurumarble/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", + "analyze": "ANALYZE=true yarn build", "start": "next start", "lint": "next lint", "gen": "svgr --index-template src/assets/icons/templates/indexTemplate.cjs --config-file src/assets/icons/config/basic.config.cjs", @@ -15,6 +16,7 @@ "@emotion/is-prop-valid": "^1.2.1", "@monorepo/hooks": "workspace:*", "@monorepo/ui": "workspace:*", + "@next/bundle-analyzer": "13.3.5-canary.9", "@react-hookz/web": "^23.1.0", "@tanstack/react-query": "^4.33.0", "@tanstack/react-query-devtools": "^4.33.0", diff --git a/packages/ui/package.json b/packages/ui/package.json index 13d86f12..1633bfea 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -3,6 +3,7 @@ "packageManager": "yarn@3.3.0", "version": "0.1.0", "description": "", + "sideEffects": false, "main": "index.ts", "author": "", "license": "ISC", diff --git a/yarn.lock b/yarn.lock index 67042186..f0636597 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1621,6 +1621,7 @@ __metadata: "@emotion/is-prop-valid": ^1.2.1 "@monorepo/hooks": "workspace:*" "@monorepo/ui": "workspace:*" + "@next/bundle-analyzer": 13.3.5-canary.9 "@react-hookz/web": ^23.1.0 "@svgr/cli": ^8.0.1 "@svgr/core": ^8.0.0 @@ -1668,6 +1669,15 @@ __metadata: languageName: unknown linkType: soft +"@next/bundle-analyzer@npm:13.3.5-canary.9": + version: 13.3.5-canary.9 + resolution: "@next/bundle-analyzer@npm:13.3.5-canary.9" + dependencies: + webpack-bundle-analyzer: 4.7.0 + checksum: 1efa82661effcd3d881289a9cfff0bf59d55023daa24af24b6fbf63205d70d948a44bcf76e3f95575a94daaec0ff2675ccd818a20013b4691555c4882dab30aa + languageName: node + linkType: hard + "@next/env@npm:13.5.3": version: 13.5.3 resolution: "@next/env@npm:13.5.3" @@ -1761,6 +1771,13 @@ __metadata: languageName: node linkType: hard +"@polka/url@npm:^1.0.0-next.20": + version: 1.0.0-next.23 + resolution: "@polka/url@npm:1.0.0-next.23" + checksum: 4b0330de1ceecd1002c7e7449094d0c41f2ed0e21765f4835ccc7b003f2f024ac557d503b9ffdf0918cf50b80d5b8c99dfc5a91927e7b3c468b09c6bb42a3c41 + languageName: node + linkType: hard + "@react-hookz/deep-equal@npm:^1.0.4": version: 1.0.4 resolution: "@react-hookz/deep-equal@npm:1.0.4" @@ -2422,6 +2439,22 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^8.0.0": + version: 8.2.0 + resolution: "acorn-walk@npm:8.2.0" + checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 + languageName: node + linkType: hard + +"acorn@npm:^8.0.4": + version: 8.10.0 + resolution: "acorn@npm:8.10.0" + bin: + acorn: bin/acorn + checksum: 538ba38af0cc9e5ef983aee196c4b8b4d87c0c94532334fa7e065b2c8a1f85863467bb774231aae91613fcda5e68740c15d97b1967ae3394d20faddddd8af61d + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -2753,7 +2786,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.1.2": +"chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -3239,6 +3272,13 @@ __metadata: languageName: node linkType: hard +"duplexer@npm:^0.1.2": + version: 0.1.2 + resolution: "duplexer@npm:0.1.2" + checksum: 62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0 + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -3544,6 +3584,15 @@ __metadata: languageName: node linkType: hard +"gzip-size@npm:^6.0.0": + version: 6.0.0 + resolution: "gzip-size@npm:6.0.0" + dependencies: + duplexer: ^0.1.2 + checksum: 2df97f359696ad154fc171dcb55bc883fe6e833bca7a65e457b9358f3cb6312405ed70a8da24a77c1baac0639906cd52358dc0ce2ec1a937eaa631b934c94194 + languageName: node + linkType: hard + "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -3846,7 +3895,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.21": +"lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -4116,6 +4165,13 @@ __metadata: languageName: unknown linkType: soft +"mrmime@npm:^1.0.0": + version: 1.0.1 + resolution: "mrmime@npm:1.0.1" + checksum: cc979da44bbbffebaa8eaf7a45117e851f2d4cb46a3ada6ceb78130466a04c15a0de9a9ce1c8b8ba6f6e1b8618866b1352992bf1757d241c0ddca558b9f28a77 + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -4322,6 +4378,15 @@ __metadata: languageName: node linkType: hard +"opener@npm:^1.5.2": + version: 1.5.2 + resolution: "opener@npm:1.5.2" + bin: + opener: bin/opener-bin.js + checksum: 33b620c0d53d5b883f2abc6687dd1c5fd394d270dbe33a6356f2d71e0a2ec85b100d5bac94694198ccf5c30d592da863b2292c5539009c715a9c80c697b4f6cc + languageName: node + linkType: hard + "p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" @@ -4928,6 +4993,17 @@ __metadata: languageName: node linkType: hard +"sirv@npm:^1.0.7": + version: 1.0.19 + resolution: "sirv@npm:1.0.19" + dependencies: + "@polka/url": ^1.0.0-next.20 + mrmime: ^1.0.0 + totalist: ^1.0.0 + checksum: c943cfc61baf85f05f125451796212ec35d4377af4da90ae8ec1fa23e6d7b0b4d9c74a8fbf65af83c94e669e88a09dc6451ba99154235eead4393c10dda5b07c + languageName: node + linkType: hard + "slick-carousel@npm:^1.8.1": version: 1.8.1 resolution: "slick-carousel@npm:1.8.1" @@ -5313,6 +5389,13 @@ __metadata: languageName: node linkType: hard +"totalist@npm:^1.0.0": + version: 1.1.0 + resolution: "totalist@npm:1.1.0" + checksum: dfab80c7104a1d170adc8c18782d6c04b7df08352dec452191208c66395f7ef2af7537ddfa2cf1decbdcfab1a47afbbf0dec6543ea191da98c1c6e1599f86adc + languageName: node + linkType: hard + "tslib@npm:^2.0.3, tslib@npm:^2.4.0": version: 2.6.2 resolution: "tslib@npm:2.6.2" @@ -5445,6 +5528,25 @@ __metadata: languageName: node linkType: hard +"webpack-bundle-analyzer@npm:4.7.0": + version: 4.7.0 + resolution: "webpack-bundle-analyzer@npm:4.7.0" + dependencies: + acorn: ^8.0.4 + acorn-walk: ^8.0.0 + chalk: ^4.1.0 + commander: ^7.2.0 + gzip-size: ^6.0.0 + lodash: ^4.17.20 + opener: ^1.5.2 + sirv: ^1.0.7 + ws: ^7.3.1 + bin: + webpack-bundle-analyzer: lib/bin/analyzer.js + checksum: 4ce3b379c61ce16b2219756843407cc99f2b82cd191f653043f1b705a3e32b3af03834af0dfded98ab852313a892a148bed1a8effaacd6440f028c19f41581f3 + languageName: node + linkType: hard + "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -5494,6 +5596,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:^7.3.1": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + "yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1"