From fa47ca9dcb4311159c01da0f91c28a0864c24a77 Mon Sep 17 00:00:00 2001 From: Khushboo <68757952+desaikd@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:35:21 -0700 Subject: [PATCH] Adds browserslist integration for browserify grunt task (#774) --- Gruntfile.js | 4 ++-- package.json | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a58dc996..968a4cf3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -107,7 +107,7 @@ module.exports = function(grunt) { }, transform: [["babelify", { - "presets": ["@babel/preset-env"], // TODO this targets ES2015, we should be more specific + "presets": ["@babel/preset-env"], // Follows the browserslist from package.json "plugins" : [["@babel/transform-runtime"], ["@babel/transform-object-assign"]] }]], @@ -123,7 +123,7 @@ module.exports = function(grunt) { }, transform: [["babelify", { - "presets": ["@babel/preset-env"], // TODO this targets ES2015, we should be more specific + "presets": ["@babel/preset-env"], // Follows the browserslist from package.json "plugins" : [["@babel/transform-runtime"], ["@babel/transform-object-assign"]] }]], diff --git a/package.json b/package.json index 0ca15050..3ef041dc 100644 --- a/package.json +++ b/package.json @@ -92,5 +92,13 @@ "typescript": "Mixed-in classes with functions returning `this` have TS2526 error is DTS file. Refernce issue: https://github.com/microsoft/TypeScript/issues/52687. Upgrade to a latest typescript version once this issue is resolved", "typescript": "^3.9.10", "yargs": "^17.5.1" - } + }, + "browserslist": [ + "Chrome >= 80.0", + "Firefox >= 80.0", + "Opera >= 63.0", + "Edge >= 80.0", + "Safari >= 14.1", + "Samsung >= 12.0" + ] }