Skip to content

Commit 8dd52ef

Browse files
committed
chore: use tsup for bundling
1 parent 32c1034 commit 8dd52ef

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

package.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
"main": "build/index.js",
66
"type": "module",
77
"files": [
8-
"build/src",
9-
"build/factories",
10-
"build/index.d.ts",
11-
"build/index.js"
8+
"build"
129
],
1310
"exports": {
1411
".": "./build/index.js",
@@ -23,7 +20,7 @@
2320
"test": "cross-env NODE_DEBUG=adonisjs:http c8 npm run quick:test",
2421
"clean": "del-cli build",
2522
"typecheck": "tsc --noEmit",
26-
"compile": "npm run lint && npm run clean && tsc",
23+
"compile": "npm run lint && npm run clean && tsup-node",
2724
"build": "npm run compile",
2825
"prebenchmark": "npm run build",
2926
"benchmark": "node --experimental-import-meta-resolve build/benchmarks/index.js",
@@ -94,6 +91,7 @@
9491
"reflect-metadata": "^0.1.13",
9592
"supertest": "^6.3.3",
9693
"ts-node": "^10.9.1",
94+
"tsup": "^7.2.0",
9795
"typescript": "^5.2.2"
9896
},
9997
"dependencies": {
@@ -163,5 +161,17 @@
163161
"eslintConfig": {
164162
"extends": "@adonisjs/eslint-config/package"
165163
},
166-
"prettier": "@adonisjs/prettier-config"
164+
"prettier": "@adonisjs/prettier-config",
165+
"tsup": {
166+
"entry": [
167+
"./index.ts",
168+
"./src/types/main.ts",
169+
"./factories/main.ts"
170+
],
171+
"outDir": "./build",
172+
"clean": true,
173+
"format": "esm",
174+
"dts": true,
175+
"target": "esnext"
176+
}
167177
}

src/server/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
*/
99

1010
import onFinished from 'on-finished'
11-
import { Emitter } from '@adonisjs/events'
1211
import Middleware from '@poppinss/middleware'
1312
import type { Logger } from '@adonisjs/logger'
13+
import type { Emitter } from '@adonisjs/events'
1414
import type { Encryption } from '@adonisjs/encryption'
1515
import type { Server as HttpsServer } from 'node:https'
1616
import type { Application } from '@adonisjs/application'

0 commit comments

Comments
 (0)