Skip to content

Resolve #3398 Add flag to disable sourcemap url annotation - #3517

Merged
matthew-dean merged 2 commits into
less:masterfrom
hirosato:add-flag-to-disable-sourcemap-url-annotation
Jun 17, 2020
Merged

Resolve #3398 Add flag to disable sourcemap url annotation#3517
matthew-dean merged 2 commits into
less:masterfrom
hirosato:add-flag-to-disable-sourcemap-url-annotation

Conversation

@hirosato

Copy link
Copy Markdown
Contributor

Small doubts
Shall I use positive form for the property? I mean using appendSourcemapUrlAnnotation, for example, instead of disableSourcemapAnnotation sounds more straightforward for me. In other words, disableSourcemapAnnotation: false/true looks a little bit confusing.
--source-map-no-annotation, on the other hand, looks ok for me since it does not have true/false value with it.

@hirosato
hirosato marked this pull request as draft June 13, 2020 07:00
@hirosato hirosato changed the title Add flag to disable sourcemap url annotation Resolve #3398 Add flag to disable sourcemap url annotation Jun 13, 2020
@hirosato
hirosato force-pushed the add-flag-to-disable-sourcemap-url-annotation branch from 458d2d3 to 1c4c51a Compare June 13, 2020 07:13
@hirosato
hirosato marked this pull request as ready for review June 13, 2020 07:13
@matthew-dean

Copy link
Copy Markdown
Member

"Disable" seems ok since having the annotation present by default is the intuited (default) behavior.

@matthew-dean
matthew-dean merged commit a3641e4 into less:master Jun 17, 2020
@hirosato

Copy link
Copy Markdown
Contributor Author

"Disable" seems ok since having the annotation present by default is the intuited (default) behavior.

I get it. thank you for review and comment.

megheaiulian added a commit to plumelo/rollup-plugin-styler that referenced this pull request Jul 29, 2026
less 4.5.1+ (PR less/less.js#4378) auto-derives sourceMapFilename and
emits a /*# sourceMappingURL=style.css.map */ annotation into res.css
even when the caller only wants res.map. The plugin then appends its
own inline /*# sourceMappingURL=data:application/json;base64,... */
comment, producing two sourceMappingURL comments in the output.

Pass disableSourcemapAnnotation: true (available since less 3.12.0,
PR less/less.js#3517) to suppress the less-emitted annotation while
keeping res.map intact. Cast to Less.SourceMapOption because
@types/less does not include the flag.

Remaining 7 snapshot updates reflect two intentional upstream changes:
- query-string 9.1->9.4: now correctly parses URLs with query/fragment,
  so the url resolver applies publicPath to bg.png?query#hash (3 snaps)
- rollup 4.52->4.62: manualChunks now sorted by module execution order
  instead of alphabetical alias name (PR rollup#6240) (4 snaps)
github-actions Bot pushed a commit to plumelo/rollup-plugin-styler that referenced this pull request Jul 31, 2026
# [2.1.0](v2.0.0...v2.1.0) (2026-07-31)

### Bug Fixes

* **less:** disable sourcemap annotation to prevent duplicate comments ([b5dc3ba](b5dc3ba)), closes [less/less.js#4378](less/less.js#4378) [less/less.js#3517](less/less.js#3517) [query#hash](https://github.com/query/issues/hash) [rollup#6240](https://github.com/rollup/issues/6240)
* **test:** revert test script, rely on CI NODE_OPTIONS for ESM ([a0eb969](a0eb969))
* **typedoc:** update config ([cd0d808](cd0d808))

### Features

* **load-module:** support ESM-only packages with exports fields ([e2b2a27](e2b2a27))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants