From 3ecf7deeeeeb2a7e87770204631f03a0b72cf263 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 29 May 2020 09:00:44 +0000 Subject: [PATCH] Set the babel target to the same minimum Node.js version via `browserslist`. By default, if no `targets` option is passed, or `browserslist` isn't set in the `package.json`, `@babel/preset-env` only transpiles to ES2015/ES6. Since we're only testing Node.js 10+ and we've set the `engines` property to indicate our intention of only supporting Node.js 10+, I think we can transpile to a newer target safely. Not truly important to count bytes in this package, but this shaves off an unimpressive 8kB (but also a 20% reduction for this package). --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index be73a9d..2ebfc29 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "engines": { "node": ">=10.0" }, + "browserslist": "node 10", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.0",