Dockerfile: install deps before building packages (react is a workspace dep)
Dependencies like react and react-dom come from the workspace root catalog, not from individual packages. Need to install all workspace packages first so the root node_modules is populated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,12 +12,12 @@ RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-blog-templ
|
|||||||
|
|
||||||
WORKDIR /app/emdash
|
WORKDIR /app/emdash
|
||||||
|
|
||||||
# Add blog template as workspace package
|
# 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
|
||||||
|
|
||||||
# Build all packages including the blog template
|
|
||||||
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
|
|
||||||
|
# Build all packages including the blog template
|
||||||
RUN cd packages/core && pnpm build
|
RUN cd packages/core && pnpm build
|
||||||
RUN cd packages/auth && pnpm build
|
RUN cd packages/auth && pnpm build
|
||||||
RUN cd packages/blocks && pnpm install && pnpm build
|
RUN cd packages/blocks && pnpm install && pnpm build
|
||||||
|
|||||||
Reference in New Issue
Block a user