diff --git a/Dockerfile b/Dockerfile index c731410..1e8f424 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,10 +75,13 @@ RUN apt-get update && apt-get install -y \ COPY --from=install /temp/prod/node_modules node_modules COPY --from=prerelease /app/public/generated.css /app/public/ -COPY . . +COPY --from=prerelease /app/dist /app/dist + +# COPY . . +RUN mkdir data EXPOSE 3000/tcp # used for calibre ENV QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox" ENV NODE_ENV=production -ENTRYPOINT [ "bun", "run", "./src/index.tsx" ] \ No newline at end of file +ENTRYPOINT [ "bun", "run", "dist/src/index.js" ] diff --git a/package.json b/package.json index 23a19bd..e53b75a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "format": "run-p 'format:*'", "format:eslint": "eslint --fix .", "format:prettier": "prettier --write .", - "build": "bun x @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", + "build:js": "tsc", + "build": "bun x @tailwindcss/cli -i ./src/main.css -o ./public/generated.css && bun run build:js", "lint": "run-p 'lint:*'", "lint:tsc": "tsc --noEmit", "lint:knip": "knip", diff --git a/tsconfig.json b/tsconfig.json index 500a42a..90304aa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,8 +5,9 @@ "target": "ES2021", "moduleResolution": "bundler", "moduleDetection": "force", - "allowImportingTsExtensions": true, - "noEmit": true, + // "allowImportingTsExtensions": true, + "outDir": "dist", + "noEmit": false, "composite": true, "strict": true, "downlevelIteration": true, @@ -24,7 +25,10 @@ // "noUnusedParameters": true, "exactOptionalPropertyTypes": true, "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true + "noImplicitOverride": true, + "resolveJsonModule": true, + "esModuleInterop": true // "noImplicitReturns": true - } + }, + "include": ["src", "package.json"] }