Skip to content

Commit 6bb7afe

Browse files
authored
fix: copy mail template file when pnpm build (#500)
1 parent 66d3f52 commit 6bb7afe

File tree

3 files changed

+249
-46
lines changed

3 files changed

+249
-46
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ COPY --from=frontend /app/dist /app/public
5757

5858
COPY --from=backend /app/build /app/build
5959

60-
COPY --from=backend /app/src/utils/templates /app/build/utils/templates
61-
6260
EXPOSE 3002
6361

6462
CMD ["sh", "-c", "node --import tsx/esm ./build/index.js"]

service/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"dev": "tsx watch ./src/index.ts",
2121
"prod": "node --import tsx/esm ./build/index.js",
2222
"prod-node18": "node --loader tsx/esm ./build/index.js",
23-
"build": "pnpm clean && tsc",
23+
"build": "pnpm clean && tsc && pnpm copy",
24+
"copy": "copyfiles -u 1 src/utils/templates/* build",
2425
"clean": "rimraf build",
2526
"lint": "eslint .",
2627
"lint:fix": "eslint . --fix",
@@ -58,8 +59,9 @@
5859
"@types/nodemailer": "^6.4.14",
5960
"@types/request-ip": "^0.0.41",
6061
"@types/speakeasy": "^2.0.10",
62+
"copyfiles": "^2.4.1",
6163
"eslint": "^8.56.0",
62-
"rimraf": "^4.3.0",
64+
"rimraf": "^5.0.5",
6365
"typescript": "~5.3.3"
6466
}
6567
}

0 commit comments

Comments
 (0)