Fix API crash: add exports field and clean runtime image #44
@@ -0,0 +1,9 @@
|
|||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
*.md
|
||||||
|
.github
|
||||||
|
apps/e2e
|
||||||
|
apps/web/dist
|
||||||
|
apps/api/dist
|
||||||
|
packages/db/dist
|
||||||
|
packages/types/dist
|
||||||
@@ -36,6 +36,9 @@ COPY --from=builder /app/packages/db/package.json packages/db/package.json
|
|||||||
COPY --from=builder /app/packages/types/dist packages/types/dist
|
COPY --from=builder /app/packages/types/dist packages/types/dist
|
||||||
COPY --from=builder /app/packages/types/package.json packages/types/package.json
|
COPY --from=builder /app/packages/types/package.json packages/types/package.json
|
||||||
|
|
||||||
|
# Remove any TS source files that should not be in the runtime image
|
||||||
|
RUN rm -rf packages/db/src packages/types/src
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "apps/api/dist/index.js"]
|
CMD ["node", "apps/api/dist/index.js"]
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,15 @@
|
|||||||
"name": "@groombook/db",
|
"name": "@groombook/db",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./src/index.ts",
|
"types": "./src/index.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./src/index.ts",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"generate": "drizzle-kit generate",
|
"generate": "drizzle-kit generate",
|
||||||
|
|||||||
@@ -2,8 +2,15 @@
|
|||||||
"name": "@groombook/types",
|
"name": "@groombook/types",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./src/index.ts",
|
"types": "./src/index.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./src/index.ts",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
Reference in New Issue
Block a user