fix(credit-operations): export TypeScript source directly

Allows Vite/SvelteKit to import the package without a prior build step,
matching the pattern used by other shared packages like shared-credit-ui.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-24 11:31:20 +01:00
parent 3c6253a84b
commit c21347351a
2 changed files with 7 additions and 10 deletions

View file

@ -51,8 +51,8 @@ COPY packages/credit-operations ./packages/credit-operations
# Copy manacore web
COPY apps/manacore/apps/web ./apps/manacore/apps/web
# Install dependencies (ignore scripts to prevent premature builds)
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --ignore-scripts
# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
# Build shared packages that need building
WORKDIR /app/packages/shared-vite-config
@ -64,9 +64,6 @@ RUN pnpm build || true
WORKDIR /app/packages/shared-error-tracking
RUN pnpm build
WORKDIR /app/packages/credit-operations
RUN pnpm build
# Build the web app
WORKDIR /app/apps/manacore/apps/web
RUN pnpm exec svelte-kit sync

View file

@ -3,13 +3,13 @@
"version": "1.0.0",
"private": true,
"description": "Central credit operation definitions and costs for all Mana apps",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js"
"types": "./src/index.ts",
"import": "./src/index.ts",
"default": "./src/index.ts"
}
},
"scripts": {