Skip to content

Commit

Permalink
fix: package export path for tsconfig (RSSNext#1690)
Browse files Browse the repository at this point in the history
* fix: update package.json paths and enable composite in tsconfig

* fix: add tsconfig.tsbuildinfo to .gitignore

* fix: enable composite in main

* fix: update AppType import path

* chore: clean tsup
  • Loading branch information
lawvs authored Nov 22, 2024
1 parent 1353d4b commit 00826ae
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ vite.config.*.mjs

.generated
.turbo
tsconfig.tsbuildinfo
6 changes: 3 additions & 3 deletions apps/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
},
"exports": {
".": {
"types": "./dist/export.d.ts",
"import": "./dist/export.js"
"types": "./export.d.ts",
"import": "./export.js"
}
},
"main": "./src/index.ts",
"scripts": {
"build": "tsup",
"build": "tsc",
"test": "vitest",
"typecheck": "tsc --noEmit"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/main/src/lib/api-client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { AppType } from "@follow/shared"
import { env } from "@follow/shared/env"
import PKG from "@pkg"
import { hc } from "hono/client"
import { ofetch } from "ofetch"

import type { AppType } from "../../../../packages/shared/src/hono"
import { logger } from "../logger"
import { getAuthSessionToken, getUser } from "./user"

Expand Down
1 change: 1 addition & 0 deletions apps/main/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
"compilerOptions": {
"composite": true,
"outDir": "dist",
"types": ["electron-vite/node"],
"moduleResolution": "Bundler",
Expand Down
12 changes: 0 additions & 12 deletions apps/main/tsup.config.ts

This file was deleted.

3 changes: 2 additions & 1 deletion apps/renderer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"@pkg": ["../../package.json"],
"@locales/*": ["../../locales/*"]
}
}
},
"references": [{ "path": "../main" }]
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"tailwindcss": "3.4.14",
"tailwindcss-animate": "1.0.7",
"tailwindcss-motion": "0.3.0-beta",
"tsup": "8.3.5",
"tsx": "4.19.2",
"turbo": "2.2.3",
"typescript": "5.6.3",
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./constants"
export type { AppType } from "./hono"
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 00826ae

Please sign in to comment.