aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/resource_transformers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-12-02 09:26:38 +0100
committerBjørn Erik Pedersen <[email protected]>2022-12-05 16:36:45 +0100
commite93138dfdb07dba1b743aa1b374e6fb8d2ba46bf (patch)
treebc8cf1bb6780a112920aae32f7a6c2a312cda668 /resources/resource_transformers
parent7d16c3c0c18859bf52f101c5671ebc0ad74dee11 (diff)
downloadhugo-e93138dfdb07dba1b743aa1b374e6fb8d2ba46bf.tar.gz
hugo-e93138dfdb07dba1b743aa1b374e6fb8d2ba46bf.zip
dartsass: Add sourceMapIncludeSources option
Diffstat (limited to 'resources/resource_transformers')
-rw-r--r--resources/resource_transformers/tocss/dartsass/client.go3
-rw-r--r--resources/resource_transformers/tocss/dartsass/transform.go5
2 files changed, 6 insertions, 2 deletions
diff --git a/resources/resource_transformers/tocss/dartsass/client.go b/resources/resource_transformers/tocss/dartsass/client.go
index 7c3a7ecba..f5f42a6dc 100644
--- a/resources/resource_transformers/tocss/dartsass/client.go
+++ b/resources/resource_transformers/tocss/dartsass/client.go
@@ -127,6 +127,9 @@ type Options struct {
// When enabled, Hugo will generate a source map.
EnableSourceMap bool
+
+ // If enabled, sources will be embedded in the generated source map.
+ SourceMapIncludeSources bool
}
func decodeOptions(m map[string]any) (opts Options, err error) {
diff --git a/resources/resource_transformers/tocss/dartsass/transform.go b/resources/resource_transformers/tocss/dartsass/transform.go
index 9d17d3bcc..3aca916fc 100644
--- a/resources/resource_transformers/tocss/dartsass/transform.go
+++ b/resources/resource_transformers/tocss/dartsass/transform.go
@@ -85,8 +85,9 @@ func (t *transform) Transform(ctx *resources.ResourceTransformationCtx) error {
baseDir: baseDir,
c: t.c,
},
- OutputStyle: godartsass.ParseOutputStyle(opts.OutputStyle),
- EnableSourceMap: opts.EnableSourceMap,
+ OutputStyle: godartsass.ParseOutputStyle(opts.OutputStyle),
+ EnableSourceMap: opts.EnableSourceMap,
+ SourceMapIncludeSources: opts.SourceMapIncludeSources,
}
// Append any workDir relative include paths