Skip to content

Commit

Permalink
build: fix ESM module handling in build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and jamesbroadhead committed Jan 24, 2025
1 parent 4374ea9 commit fdda305
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"lint:fix": "pnpm typecheck && eslint src --fix && prettier --w .",
"build": "pnpm generateParams && pnpm clean && tsc && cp src/*.html package*.json README.md ./dist",
"clean": "rm -rf dist",
"generateParams": "node --loader ts-node/esm generateOptionsFromSpec.ts",
"generateParams": "NODE_OPTIONS=\"--loader ts-node/esm --experimental-specifier-resolution=node\" node generateOptionsFromSpec.ts",
"start": "node dist/index.js",
"pretest": "pnpm build",
"test": "vitest run",
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
"strictNullChecks": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
"include": ["src/**/*.ts", "generateOptionsFromSpec.ts"],
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"
}
}

0 comments on commit fdda305

Please sign in to comment.