-
|
I have a cli app #!/usr/bin/env node
const greetingWords = ["hello", "world"];
const separator = " ";
console.log(greetingWords.join(separator));I build it it becomes: #!/usr/bin/env node
//#region src/index.ts
console.log(["hello", "world"].join(" "));
//#endregion
export {};
//# sourceMappingURL=index.mjs.mapNotice I want to disable this for a better debugging experience when running it, for example via Anyone know how? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
That output is coming from the bundler, not from the source map flag.
vp pack --sourcemap --no-treeshake --unbundleor in config: export default defineConfig({
pack: {
sourcemap: true,
treeshake: false,
unbundle: true,
},
})If you still bundle into one file, Rolldown/tsdown may still simplify local constants in generated output. For debugging, the more reliable route is to debug through the source map in your original |
Beta Was this translation helpful? Give feedback.
That output is coming from the bundler, not from the source map flag.
--sourcemaplets the debugger map generated code back to the original TypeScript, but it does not promise to preserve the generated JavaScript's local variables.vp packwraps tsdown, and the CLI exposes the relevant knobs:or in config:
If you still bundle into one file, Rolldown/tsdown may still simplify local constants in generated output. For debugging, the more reliable route is to debug through the source map in your original
src/index.ts, or useunbundle/non-…