Skip to content

Comments

fix(esbuild): handle sourcemap object without type property#13246

Merged
czubocha merged 1 commit intomainfrom
sc-3716
Jan 14, 2026
Merged

fix(esbuild): handle sourcemap object without type property#13246
czubocha merged 1 commit intomainfrom
sc-3716

Conversation

@czubocha
Copy link
Contributor

Problem

Setting build.esbuild.sourcemap.setNodeOptions: false in serverless.yml caused an esbuild error:

"sourcemap" must be a string or a boolean

This happened because the full sourcemap object ({ setNodeOptions: false }) was passed directly to esbuild, which only accepts string or boolean values.

Solution

When sourcemap is an object without a type property, default to sourcemap: true for esbuild while still respecting the setNodeOptions setting.

@czubocha czubocha requested a review from eahefnawy January 13, 2026 21:39
@Mmarzex
Copy link
Contributor

Mmarzex commented Jan 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@czubocha czubocha merged commit b0640bb into main Jan 14, 2026
10 checks passed
@czubocha czubocha deleted the sc-3716 branch January 14, 2026 16:16
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants