### Prerequisites - [x] I have read the [Contributing Guidelines](https://github.com/stenciljs/core/blob/main/CONTRIBUTING.md). - [x] I agree to follow the [Code of Conduct](https://github.com/stenciljs/core/blob/main/CODE_OF_CONDUCT.md). - [x] I have searched for [existing issues](https://github.com/stenciljs/core/issues) that already report this problem, without success. ### Stencil Version 4.28.1/2 (maybe 0, but I cannot build in 0) ### Current Behavior In version 4.27.2 building dist output: - Setting sourcemap to false will not generate .js.map files and no reference is added to the js file (both esm and cjs). - Setting sourcemap to true will generate js.map files and a single reference is added to the js file. In version 4.28.1 - setting sourcemap to false will generate an empty js.map file that contains: {"sourcesContent":[]} and a reference is added to the js file - Setting sourcemap to true generates js map files and adding 2 references in the js file ### Expected Behavior The 4.27.2 behaviour is the correct one. ### System Info ```shell System: node 22.13.1 Platform: darwin (24.3.0) CPU Model: Apple M4 Max (16 cpus) Compiler: /Users/tally/yoobic/yoobic-ng-6/node_modules/@stencil/core/compiler/stencil.js Build: 1741825324 Stencil: 4.28.1 🐵 TypeScript: 5.5.4 Rollup: 4.34.9 Parse5: 7.2.1 jQuery: 4.0.0-pre Terser: 5.37.0 ``` ### Steps to Reproduce Build as described above and check the links ### Code Reproduction URL not needed. any build will do. ### Additional Information Rollup upstream issue, most likely. or this: https://github.com/stenciljs/core/pull/6187/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R131
Activity
[-]bug: sourcemap link is emitted twice[/-][+]bug: Wrong sourcemap emitting[/+]johnjenkins commentedon Dec 11, 2025
hey @Tallyb - I've just checked this out with latest Stencil and everything seems to work as described in 4.27.2 again 🥳
I'm going to close this one out - lemme know if I've missed something and I'll re-open