Skip to content

Commit

Permalink
build: avoid doubly-bundling runtime types (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jun 21, 2023
1 parent 0145f01 commit c5dd2a1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
node-version: 16
cache: "pnpm"
- run: pnpm install
- run: pnpm stub
- name: Fix lint issues
run: npm run lint:fix
- uses: autofix-ci/action@8bc06253bec489732e5f9c52884c7cace15c0160
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
node-version: "16"
cache: pnpm
- run: pnpm install
- run: pnpm stub
- run: pnpm lint

ci:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"types": "./types.d.ts",
"import": "./dist/index.mjs"
},
"./config": {
Expand All @@ -20,7 +20,7 @@
"./package.json": "./package.json"
},
"main": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"types": "./types.d.ts",
"bin": {
"nitro": "./dist/cli.mjs",
"nitropack": "./dist/cli.mjs"
Expand Down Expand Up @@ -152,4 +152,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion src/runtime/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { H3Event } from "h3";

import type { RenderResponse } from "../types";
import type { RenderResponse } from "./types";
export type { NitroApp } from "./app";
export type {
CacheEntry,
Expand Down
1 change: 0 additions & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ export * from "./serialize";
export * from "./nitro";
export * from "./handler";
export * from "./utils";
export * from "../runtime/types";
2 changes: 2 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './dist/index'
export * from './dist/runtime/types'

0 comments on commit c5dd2a1

Please sign in to comment.