Dockerfile: enable pnpm hoisting so react/react-dom are at top-level
The pnpm isolated linker puts packages deep in .pnpm/store. Adding node-linker=hoisted to .npmrc makes pnpm hoist packages like npm, so react is accessible at /app/node_modules/react. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ WORKDIR /app/emdash
|
|||||||
# Add blog template as workspace package and install all deps
|
# Add blog template as workspace package and install all deps
|
||||||
RUN cp -r /app/blog-template packages/blog-template
|
RUN cp -r /app/blog-template packages/blog-template
|
||||||
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
||||||
|
# Enable hoisting so packages are accessible at top-level node_modules
|
||||||
|
RUN echo "node-linker=hoisted" >> .npmrc
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
|
|
||||||
# Build all packages including the blog template
|
# Build all packages including the blog template
|
||||||
|
|||||||
Reference in New Issue
Block a user