Skip to content

Commit

Permalink
build: use node-linker for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Mar 10, 2024
1 parent 9911c62 commit a3b68fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ generateDefaultNix: false

nixExprPath: nix/yarn-project.nix

nodeLinker: pnpm
nodeLinker: node-modules

packageExtensions:
"@storybook/builder-vite@*":
Expand Down
4 changes: 4 additions & 0 deletions nix/yarn-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ let
cp --reflink=auto --recursive .yarn "$out/libexec/$name"
# Copy the Yarn linker output into the package.
cp --reflink=auto --recursive node_modules "$out/libexec/$name"
fi
cd "$out/libexec/$name"
Expand All @@ -129,6 +130,9 @@ let
mkdir -p "$out/bin"
yarn nixify install-bin $out/bin
# A package with node_modules doesn't need the cache
yarn cache clean
runHook postInstall
'';

Expand Down

0 comments on commit a3b68fc

Please sign in to comment.