From ac26358a6c936aafb08c648841155bcca0609f0d Mon Sep 17 00:00:00 2001 From: wass08 Date: Wed, 4 Feb 2026 10:22:57 +0900 Subject: [PATCH] fix build + watcher --- apps/editor/next.config.ts | 5 +++-- packages/core/package.json | 24 +++++++----------------- packages/viewer/package.json | 24 +++++++----------------- turbo.json | 3 ++- 4 files changed, 19 insertions(+), 37 deletions(-) diff --git a/apps/editor/next.config.ts b/apps/editor/next.config.ts index 70f4f47b..eedfce26 100644 --- a/apps/editor/next.config.ts +++ b/apps/editor/next.config.ts @@ -1,5 +1,6 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { +import type { NextConfig } from 'next' + +const nextConfig: NextConfig = { transpilePackages: ['three', '@pascal-app/viewer', '@pascal-app/core'], } diff --git a/packages/core/package.json b/packages/core/package.json index 0436be18..0c79eb5b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,15 +1,15 @@ { "name": "@pascal-app/core", - "version": "0.1.5", + "version": "0.1.8", "description": "Core library for Pascal 3D building editor", "type": "module", - "main": "./src/index.ts", - "types": "./src/index.ts", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { ".": { - "types": "./src/index.ts", - "import": "./src/index.ts", - "default": "./src/index.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" } }, "files": [ @@ -18,19 +18,9 @@ ], "scripts": { "build": "tsc --declaration --emitDeclarationOnly && tsc", + "dev": "tsc --declaration --emitDeclarationOnly --watch & tsc --watch", "prepublishOnly": "npm run build" }, - "publishConfig": { - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.js" - } - } - }, "peerDependencies": { "@react-three/drei": "^10", "@react-three/fiber": "^9", diff --git a/packages/viewer/package.json b/packages/viewer/package.json index 2ae3e6de..cc38155b 100644 --- a/packages/viewer/package.json +++ b/packages/viewer/package.json @@ -1,15 +1,15 @@ { "name": "@pascal-app/viewer", - "version": "0.1.5", + "version": "0.1.8", "description": "3D viewer component for Pascal building editor", "type": "module", - "main": "./src/index.ts", - "types": "./src/index.ts", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { ".": { - "types": "./src/index.ts", - "import": "./src/index.ts", - "default": "./src/index.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" } }, "files": [ @@ -18,19 +18,9 @@ ], "scripts": { "build": "tsc --declaration --emitDeclarationOnly && tsc", + "dev": "tsc --declaration --emitDeclarationOnly --watch & tsc --watch", "prepublishOnly": "npm run build" }, - "publishConfig": { - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.js" - } - } - }, "peerDependencies": { "@pascal-app/core": "^0.1.4", "@react-three/drei": "^10", diff --git a/turbo.json b/turbo.json index 62383cde..8f1ce2f4 100644 --- a/turbo.json +++ b/turbo.json @@ -5,7 +5,7 @@ "build": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", ".env*"], - "outputs": [".next/**", "!.next/cache/**"] + "outputs": [".next/**", "!.next/cache/**", "dist/**"] }, "lint": { "dependsOn": ["^lint"] @@ -14,6 +14,7 @@ "dependsOn": ["^check-types"] }, "dev": { + "dependsOn": ["^build"], "cache": false, "persistent": true }