From d2862ff797d04de8f21d7e62273e9ef7cdb7e823 Mon Sep 17 00:00:00 2001 From: Emma Segal-Grossman Date: Tue, 19 Mar 2024 17:22:41 -0400 Subject: [PATCH] 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. --- frontend/package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index ebcbb496..5cc3f570 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -133,5 +133,8 @@ "**/playwright": "1.32.1", "**/lit": "3.1.1", "@web/dev-server-esbuild/esbuild": "^0.19.5" - } + }, + "browserslist": [ + "defaults" + ] }