Skip to content

Commit ab6dd4b

Browse files
authored
pass the source map option in watch mode (#353)
following is missing when generating file in watch mode: ```//# sourceMappingURL=csharp-codegen.js.map``` <img width="3402" height="260" alt="image" src="https://github.com/user-attachments/assets/126cc552-fbd8-4541-8582-20ea66cc1624" />
1 parent ccdcdd7 commit ab6dd4b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@alloy-js/cli"
5+
---
6+
7+
Make sure sourceMappingURL is added in --watch mode

packages/cli/src/cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ function watchMain() {
101101
.map((x) => x.fileName),
102102
opts.rootDir,
103103
opts.outDir,
104-
{ addSourceInfo },
104+
{
105+
sourceMaps: opts.options.sourceMap,
106+
addSourceInfo,
107+
},
105108
);
106109
} catch (e) {
107110
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)