Merge pull request #57 from antonio-ivanovski/fix-dist-import 0803907a
fix: remove /dist from module imports
Steve Simkins · 2026-02-15 16:06 4 file(s) · +14 −2
README.md +1 −1
73 73
```typescript src/index.ts
74 74
import { Hono } from 'hono'
75 75
import { cors } from 'hono/cors'
76 -
import type { ApiResponse } from 'shared/dist'
76 +
import type { ApiResponse } from 'shared'
77 77
78 78
const app = new Hono()
79 79
server/package.json +6 −0
3 3
  "version": "0.0.1",
4 4
  "main": "dist/index.js",
5 5
  "types": "dist/index.d.ts",
6 +
  "exports": {
7 +
    ".": {
8 +
      "types": "./dist/index.d.ts",
9 +
      "default": "./dist/index.js"
10 +
    }
11 +
  },
6 12
  "scripts": {
7 13
    "build": "tsc",
8 14
    "dev": "bun --watch run src/index.ts"
server/src/index.ts +1 −1
1 1
import { Hono } from 'hono'
2 2
import { cors } from 'hono/cors'
3 -
import type { ApiResponse } from 'shared/dist'
3 +
import type { ApiResponse } from 'shared'
4 4
5 5
const app = new Hono()
6 6
shared/package.json +6 −0
3 3
  "version": "0.0.1",
4 4
  "main": "dist/index.js",
5 5
  "types": "dist/index.d.ts",
6 +
  "exports": {
7 +
    ".": {
8 +
      "types": "./dist/index.d.ts",
9 +
      "default": "./dist/index.js"
10 +
    }
11 +
  },
6 12
  "scripts": {
7 13
    "build": "tsc",
8 14
    "dev": "tsc --watch"