`JITI_SOURCE_MAPS` option is not included in cache params
Closed this issue · 2 comments
connor4312 commented
Environment
Node.js 22
Reproduction
- Run this file without any special settings. Notice there's no sourcemap for main.ts
- In the API turn on sourcemaps, or set JITI_SOURCE_MAPS
- Run it again. Notice there's still no sourcemap for main.ts 🐛
- Set JITI_FS_CACHE=0, and notice sourcemaps now work
Describe the bug
Changing the Jiti options should invalidate any existing cache
Additional context
Reported as an issue for the VS Code debugger in microsoft/vscode-js-debug#2149
Logs
No response
pi0 commented
Thanks for report dear @connor4312. I have merged #352 as fix for cache issue. Can you try with jiti-nightly? 🙏🏼 (you can ensure cache is updated using JITI_DEBUG=1
. if issue persists with +map
files still, this is not directly an issue with jiti (but tooling that wrongly skips sourcemap hint)