mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
fix(docker): symlink all @manacore packages in sveltekit-base image
pnpm skips workspace linking when glob patterns like apps/*/apps/* from pnpm-workspace.yaml match no directories. This caused @manacore/feedback and other packages to be copied but not linked in node_modules. Fix adds a post-install step that creates symlinks for all packages/* entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a5fe3bee8
commit
4f68215e68
1 changed files with 13 additions and 0 deletions
|
|
@ -71,6 +71,19 @@ COPY packages/wallpaper-generator ./packages/wallpaper-generator
|
|||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
||||
pnpm install --no-frozen-lockfile --ignore-scripts
|
||||
|
||||
# Ensure all @manacore workspace packages are linked in node_modules
|
||||
# (pnpm may skip linking when app/*/ dirs from pnpm-workspace.yaml don't exist)
|
||||
RUN mkdir -p node_modules/@manacore && \
|
||||
for pkg in packages/*/; do \
|
||||
name=$(node -p "require('./${pkg}package.json').name" 2>/dev/null) || continue; \
|
||||
scope=$(echo "$name" | sed -n 's|@\(.*\)/.*|\1|p'); \
|
||||
base=$(echo "$name" | sed 's|.*/||'); \
|
||||
if [ -n "$scope" ]; then \
|
||||
mkdir -p "node_modules/@${scope}"; \
|
||||
ln -sfn "../../${pkg}" "node_modules/@${scope}/${base}"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Build shared packages in dependency order
|
||||
RUN cd packages/shared-vite-config && pnpm build \
|
||||
&& cd /app/packages/shared-auth && pnpm build || true \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue