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 <[email protected]>
This commit is contained in:
1 parent
f05d518d7f
commit
ba717ceeff
1 file changed
+2
@@ -15,6 +15,8 @@ WORKDIR /app/emdash
|
||||
# Add blog template as workspace package and install all deps
|
||||
RUN cp -r /app/blog-template packages/blog-template
|
||||
RUN corepack enable && corepack prepare [email protected] --activate
|
||||
# Enable hoisting so packages are accessible at top-level node_modules
|
||||
RUN echo "node-linker=hoisted" >> .npmrc
|
||||
RUN pnpm install
|
||||
|
||||
# Build all packages including the blog template
|
||||
|
||||
Reference in new issue
Block a user