@umijs/bundler-utils
Advanced tools
Comparing version 3.0.0-beta.19 to 3.0.0-beta.20
@@ -22,8 +22,2 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _default({ | ||
@@ -33,11 +27,3 @@ config, | ||
}) { | ||
let targets = _objectSpread({ | ||
node: true, | ||
chrome: 49, | ||
firefox: 64, | ||
safari: 10, | ||
edge: 13, | ||
ios: 10 | ||
}, config.targets); | ||
let targets = config.targets || {}; | ||
targets = Object.keys(targets).filter(key => { | ||
@@ -44,0 +30,0 @@ // filter false and 0 targets |
{ | ||
"name": "@umijs/bundler-utils", | ||
"version": "3.0.0-beta.19", | ||
"version": "3.0.0-beta.20", | ||
"description": "@umijs/bundler-utils", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -21,15 +21,5 @@ import getTargetsAndBrowsersList from './getTargetsAndBrowsersList'; | ||
firefox: true, | ||
safari: 10, | ||
edge: 13, | ||
ios: 10, | ||
ie: 10, | ||
}); | ||
expect(browserslist).toEqual([ | ||
'chrome >= 0', | ||
'firefox >= 0', | ||
'safari >= 10', | ||
'edge >= 13', | ||
'ios >= 10', | ||
'ie >= 10', | ||
]); | ||
expect(browserslist).toEqual(['ie >= 10', 'chrome >= 0', 'firefox >= 0']); | ||
}); | ||
@@ -36,0 +26,0 @@ |
@@ -10,11 +10,3 @@ import { IConfig, ITargets } from '@umijs/types'; | ||
export default function({ config, type }: IOpts) { | ||
let targets: ITargets = { | ||
node: true, | ||
chrome: 49, | ||
firefox: 64, | ||
safari: 10, | ||
edge: 13, | ||
ios: 10, | ||
...config.targets, | ||
}; | ||
let targets: ITargets = config.targets || {}; | ||
@@ -21,0 +13,0 @@ targets = Object.keys(targets) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11663
381