Describe the bug
Not sure if this is a thing, but I tried deploying to Netlify and the build failed due to Unexpected token "." in __sapper__/build/server/server.js.
It turned out that this piece of code ended up in the legacy bundle untranspiled:
<meta
name="description"
content="{segment ? post?.excerpt : 'Opinions and viewpoints about Programming, Lifestyle and other topics.'}"
/>
While the optional chaining operator wasn't replaced in this snippet, a couple lines above it was replaced just fine, but there it was used in variable assignments.
To Reproduce
Use code snippet above and run "export": "NODE_ENV=production sapper export --legacy"
Expected behavior
Optional chaining operator gets transpiled.
Information about your Sapper Installation:
-
Your browser: Brave Browser: 1.12.114
-
Your hosting environment: Local
-
If it is an exported (npm run export) or dynamic application: exported application
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Sapper entirely?
Used post && post.excerpt instead, so neglectable