[{"data":1,"prerenderedAt":197},["ShallowReactive",2],{"term-w\u002Fworkspace":3,"related-w\u002Fworkspace":183},{"id":4,"title":5,"acronym":6,"body":7,"category":164,"description":165,"difficulty":166,"extension":167,"letter":168,"meta":169,"navigation":170,"path":171,"related":172,"seo":177,"sitemap":178,"stem":181,"subcategory":6,"__hash__":182},"terms\u002Fterms\u002Fw\u002Fworkspace.md","Workspace",null,{"type":8,"value":9,"toc":158},"minimark",[10,15,19,23,26,30,147,151,154],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A workspace is how package managers understand a monorepo — they see multiple packages inside one repo and manage them together. Set up workspaces and you can run a command once from the root and it applies to all the packages inside.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Workspaces are a package manager feature (npm workspaces, yarn workspaces, pnpm workspaces) that enables managing multiple packages within a single repository. They hoist shared dependencies and allow cross-package references during development.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F package.json root in a monorepo\n{\n  \"name\": \"my-monorepo\",\n  \"workspaces\": [\n    \"packages\u002Ffrontend\",\n    \"packages\u002Fbackend\",\n    \"packages\u002Fshared\"\n  ]\n}\n","json","",[38,39,40,49,56,84,99,112,124,135,141],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F package.json root in a monorepo\n",[41,50,52],{"class":43,"line":51},2,[41,53,55],{"class":54},"sMK4o","{\n",[41,57,59,62,66,69,72,75,79,81],{"class":43,"line":58},3,[41,60,61],{"class":54},"  \"",[41,63,65],{"class":64},"spNyl","name",[41,67,68],{"class":54},"\"",[41,70,71],{"class":54},":",[41,73,74],{"class":54}," \"",[41,76,78],{"class":77},"sfazB","my-monorepo",[41,80,68],{"class":54},[41,82,83],{"class":54},",\n",[41,85,87,89,92,94,96],{"class":43,"line":86},4,[41,88,61],{"class":54},[41,90,91],{"class":64},"workspaces",[41,93,68],{"class":54},[41,95,71],{"class":54},[41,97,98],{"class":54}," [\n",[41,100,102,105,108,110],{"class":43,"line":101},5,[41,103,104],{"class":54},"    \"",[41,106,107],{"class":77},"packages\u002Ffrontend",[41,109,68],{"class":54},[41,111,83],{"class":54},[41,113,115,117,120,122],{"class":43,"line":114},6,[41,116,104],{"class":54},[41,118,119],{"class":77},"packages\u002Fbackend",[41,121,68],{"class":54},[41,123,83],{"class":54},[41,125,127,129,132],{"class":43,"line":126},7,[41,128,104],{"class":54},[41,130,131],{"class":77},"packages\u002Fshared",[41,133,134],{"class":54},"\"\n",[41,136,138],{"class":43,"line":137},8,[41,139,140],{"class":54},"  ]\n",[41,142,144],{"class":43,"line":143},9,[41,145,146],{"class":54},"}\n",[11,148,150],{"id":149},"when-youll-hear-this","When You'll Hear This",[16,152,153],{},"\"Add the new package to the workspaces array in the root package.json.\" \u002F \"Workspace hoisting can cause peer dependency issues — watch out.\"",[155,156,157],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":159},[160,161,162,163],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":149,"depth":51,"text":150},"general","A workspace is how package managers understand a monorepo — they see multiple packages inside one repo and manage them together.","intermediate","md","w",{},true,"\u002Fterms\u002Fw\u002Fworkspace",[173,174,175,176],"Monorepo","Package","Dependency","node_modules",{"title":5,"description":165},{"changefreq":179,"priority":180},"weekly",0.7,"terms\u002Fw\u002Fworkspace","Eh8WYbEB6YPVM6Y0QgehtvTAi4hba_CoAJDa1YlKLUw",[184,188,191,194],{"title":175,"path":185,"acronym":6,"category":164,"difficulty":186,"description":187},"\u002Fterms\u002Fd\u002Fdependency","beginner","A dependency is a package your project relies on to work. Your app depends on React to render UI, axios to make requests, and dotenv to read config.",{"title":173,"path":189,"acronym":6,"category":164,"difficulty":166,"description":190},"\u002Fterms\u002Fm\u002Fmonorepo","A monorepo is when you put all your different projects — frontend, backend, shared libraries — in one giant single repository instead of separate repos.",{"title":176,"path":192,"acronym":6,"category":164,"difficulty":186,"description":193},"\u002Fterms\u002Fn\u002Fnode-modules","node_modules is the folder where npm dumps all the packages you install. It can grow to hundreds of megabytes instantly and contains thousands of files.",{"title":174,"path":195,"acronym":6,"category":164,"difficulty":186,"description":196},"\u002Fterms\u002Fp\u002Fpackage","A package is a bundle of code someone else wrote and published so you don't have to reinvent the wheel. Need to parse dates? There's a package for that.",1776518258754]