{"id":15775110,"url":"https://github.com/katt/nextjs-layout-page-coupling","last_synced_at":"2025-03-31T14:41:19.510Z","repository":{"id":244410847,"uuid":"815168658","full_name":"KATT/nextjs-layout-page-coupling","owner":"KATT","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-14T14:27:05.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-05T16:42:17.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KATT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T13:53:51.000Z","updated_at":"2024-06-14T14:27:08.000Z","dependencies_parsed_at":"2024-06-14T15:18:38.286Z","dependency_job_id":"1135e881-202d-43c6-b3ea-6d542d85437b","html_url":"https://github.com/KATT/nextjs-layout-page-coupling","commit_stats":null,"previous_names":["katt/nextjs-layout-page-coupling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KATT%2Fnextjs-layout-page-coupling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KATT%2Fnextjs-layout-page-coupling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KATT%2Fnextjs-layout-page-coupling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KATT%2Fnextjs-layout-page-coupling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KATT","download_url":"https://codeload.github.com/KATT/nextjs-layout-page-coupling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246484189,"owners_count":20785022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T16:42:21.776Z","updated_at":"2025-03-31T14:41:19.488Z","avatar_url":"https://github.com/KATT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Demos recompilation of of `page.js` being slow due to `layout.js` being complex\n\nIn the layout here, we have a loop that blocks the event loop for 10s:\n\nhttps://github.com/KATT/nextjs-layout-page-coupling/blob/5eaecca1a0b96bfb7e59b9cc57c36c6a4728f690/app/layout.js#L6-L9\n\nThe page itself is dead simple, but changing it gets punished by the layout being complex.\n\nhttps://github.com/KATT/nextjs-layout-page-coupling/blob/5eaecca1a0b96bfb7e59b9cc57c36c6a4728f690/app/page.js#L1-L3\n\nThis isn't a big problem itself - who writes silly code like that, right? - Well, the issue is exasperated by the dev server being very slow on any barrel imports so any complex layout with many imports will have a pretty bad experience when developing.\n\n---\n\n```shell\ngit clone git@github.com:KATT/nextjs-layout-page-coupling.git\ncd nextjs-layout-page-coupling\npnpm i\npnpm dev\n```\n\n- Run `pnpm dev`\n- Go to localhost:3000\n- First load is slow and that's ok\n- Change `page.js` -\u003e wait\n\n---\n\nRelated issue: https://github.com/vercel/next.js/issues/48748\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatt%2Fnextjs-layout-page-coupling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatt%2Fnextjs-layout-page-coupling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatt%2Fnextjs-layout-page-coupling/lists"}