Skip to content

Commit

Permalink
Use defaults, and adjust logic for IE 11, see #1323
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 28, 2022
1 parent ee39dee commit 0ce4448
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/grunt/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ const babel = require( '@babel/core' ); // eslint-disable-line require-statement
* @returns {string} - The transpiled code
*/
module.exports = function( jsInput, forIE = false ) {

// See options available at https://babeljs.io/docs/usage/api/

// see https://browsersl.ist/#q=%3E+0.25%25%2C+not+dead
const browsers = [
'> 0.25%',
'not dead'
'defaults'
];
browsers.push( forIE ? 'IE 11' : 'not IE 11' );
if ( forIE ) {
browsers.push( 'IE 11' );
}

return babel.transform( jsInput, {
// Avoids a warning that this gets disabled for >500kb of source. true/false doesn't affect the later minified size, and
Expand Down

0 comments on commit 0ce4448

Please sign in to comment.