This commit is contained in:
+5
-2
@@ -4,14 +4,17 @@ RUN rustup target add wasm32-unknown-unknown \
|
||||
&& cargo install wasm-pack
|
||||
WORKDIR /wasm
|
||||
COPY crates/stp_wasm/ crates/stp_wasm/
|
||||
RUN wasm-pack build crates/stp_wasm --target web --out-dir ../../src/wasm
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/wasm/crates/stp_wasm/target \
|
||||
wasm-pack build crates/stp_wasm --target web --out-dir ../../src/wasm
|
||||
|
||||
# Stage 2: Build Vue frontend
|
||||
FROM node:22-slim
|
||||
RUN apt-get update && apt-get install -y make git && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci
|
||||
COPY . .
|
||||
COPY --from=wasm-builder /wasm/src/wasm/ src/wasm/
|
||||
CMD ["sh", "-c", "npx vite build --outDir /output --emptyOutDir"]
|
||||
|
||||
Reference in New Issue
Block a user