fix: package export path for tsconfig (#1690)
* 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
This commit is contained in:
@@ -20,3 +20,4 @@ vite.config.*.mjs
|
||||
|
||||
.generated
|
||||
.turbo
|
||||
tsconfig.tsbuildinfo
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "dist",
|
||||
"types": ["electron-vite/node"],
|
||||
"moduleResolution": "Bundler",
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { defineConfig } from "tsup"
|
||||
|
||||
export default defineConfig(() => ({
|
||||
entry: ["./export.ts"],
|
||||
outDir: "dist",
|
||||
format: "esm",
|
||||
clean: true,
|
||||
dts: true,
|
||||
splitting: false,
|
||||
sourcemap: true,
|
||||
skipNodeModulesBundle: true,
|
||||
}))
|
||||
@@ -17,5 +17,6 @@
|
||||
"@pkg": ["../../package.json"],
|
||||
"@locales/*": ["../../locales/*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"references": [{ "path": "../main" }]
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from "./constants"
|
||||
export type { AppType } from "./hono"
|
||||
|
||||
Generated
-3
@@ -224,9 +224,6 @@ importers:
|
||||
tailwindcss-motion:
|
||||
specifier: 0.3.0-beta
|
||||
version: 0.3.0-beta(tailwindcss@3.4.14(ts-node@10.9.1(@types/node@22.8.7)(typescript@5.6.3)))
|
||||
tsup:
|
||||
specifier: 8.3.5
|
||||
version: 8.3.5(jiti@2.3.3)(postcss@8.4.47)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.6.0)
|
||||
tsx:
|
||||
specifier: 4.19.2
|
||||
version: 4.19.2
|
||||
|
||||
Reference in New Issue
Block a user