Emit more modern code for browsers (#1614)

Adds a `browserlist` field to `package.json`, which Webpack picks up so
it doesn't convert nullish coalescing operators into obfuscated messes
like `key !== null && key !== void 0 ? key : null`.

This improves output size a little & improves the debugging experience
as well.

Tested in Chrome, FF, & Safari locally and didn't encounter any issues.
This commit is contained in:
Emma Segal-Grossman 2024-03-19 17:22:41 -04:00 committed by GitHub
parent 41d6e79cb3
commit d2862ff797
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,5 +133,8 @@
"**/playwright": "1.32.1",
"**/lit": "3.1.1",
"@web/dev-server-esbuild/esbuild": "^0.19.5"
}
},
"browserslist": [
"defaults"
]
}