Skip to content

Commit 606db20

Browse files
committed
feat: move to tsx for automatic Typescript support
1 parent 5229f5f commit 606db20

File tree

4 files changed

+271
-0
lines changed

4 files changed

+271
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
"pinst": "^3.0.0",
127127
"supertest": "^7.0.0",
128128
"tsconfig-paths": "^4.2.0",
129+
"tsx": "^4.19.1",
129130
"typescript": "^5.6.3",
130131
"vitest": "^2.1.3"
131132
},

src/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export async function bootstrap<
8181
let entrypoint: string;
8282
let codepath: 'build' | 'dist' | 'src' = 'build';
8383
if (isDev() && argv?.built !== true) {
84+
await import('tsx/esm');
8485
if (main) {
8586
entrypoint = main.replace(/^(\.?\/?)(build|dist)\//, '$1src/').replace(/\.js$/, '.ts');
8687
} else {

src/tsx.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module 'tsx/esm';

0 commit comments

Comments
 (0)