Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"ajv": "6.10.2",
"autoprefixer": "9.7.1",
"babel-loader": "8.0.6",
"browserslist": "4.8.3",
"browserslist": "^4.9.1",
"cacache": "13.0.1",
"caniuse-lite": "1.0.30001020",
"caniuse-lite": "^1.0.30001032",
"cssnano": "4.1.10",
"circular-dependency-plugin": "5.2.0",
"coverage-istanbul-loader": "2.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ export async function process(options: ProcessBundleOptions): Promise<ProcessBun
let downlevelCode;
let downlevelMap;
if (downlevel) {
const {supportedBrowsers: targets = []} = options;

// todo: revisit this in version 10, when we update our defaults browserslist
// Without this workaround bundles will not be downlevelled because Babel doesn't know handle to 'op_mini all'
// See: https://github.com/babel/babel/issues/11155
if (Array.isArray(targets) && targets.includes('op_mini all')) {
targets.push('ie_mob 11');
} else if ('op_mini' in targets) {
targets['ie_mob'] = '11';
}

// Downlevel the bundle
const transformResult = await transformAsync(sourceCode, {
filename,
Expand All @@ -131,7 +142,7 @@ export async function process(options: ProcessBundleOptions): Promise<ProcessBun
require.resolve('@babel/preset-env'),
{
// browserslist-compatible query or object of minimum environment versions to support
targets: options.supportedBrowsers,
targets,
// modules aren't needed since the bundles use webpack's custom module loading
modules: false,
// 'transform-typeof-symbol' generates slower code
Expand Down
33 changes: 27 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"

browserslist@4.8.3, browserslist@^4.0.0:
browserslist@^4.0.0:
version "4.8.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44"
integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==
Expand All @@ -2608,6 +2608,15 @@ browserslist@^4.8.2:
electron-to-chromium "^1.3.322"
node-releases "^1.1.42"

browserslist@^4.9.1:
version "4.9.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.9.1.tgz#01ffb9ca31a1aef7678128fc6a2253316aa7287c"
integrity sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==
dependencies:
caniuse-lite "^1.0.30001030"
electron-to-chromium "^1.3.363"
node-releases "^1.1.50"

browserstack@^1.5.1:
version "1.5.3"
resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.3.tgz#93ab48799a12ef99dbd074dd595410ddb196a7ac"
Expand Down Expand Up @@ -2851,11 +2860,6 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@1.0.30001020:
version "1.0.30001020"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001020.tgz#3f04c1737500ffda78be9beb0b5c1e2070e15926"
integrity sha512-yWIvwA68wRHKanAVS1GjN8vajAv7MBFshullKCeq/eKpK7pJBVDgFFEqvgWTkcP2+wIDeQGYFRXECjKZnLkUjA==

caniuse-lite@^1.0.0:
version "1.0.30001017"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001017.tgz#d3ad6ec18148b9bd991829958d9d7e562bb78cd6"
Expand All @@ -2876,6 +2880,11 @@ caniuse-lite@^1.0.30001017:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001018.tgz#dd5cd57e77980db03e4fb7a4e9b4a96e32e1d733"
integrity sha512-GTHI7xdD2EX/U9UgNCEdekriT81N6ZwipsTGKAI1hrv3VEC96BvS5RVoc9Odlf9ftS92oxgflAGbYLi8UjIiVA==

caniuse-lite@^1.0.30001030, caniuse-lite@^1.0.30001032:
version "1.0.30001032"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001032.tgz#b8d224914e2cd7f507085583d4e38144c652bce4"
integrity sha512-8joOm7BwcpEN4BfVHtfh0hBXSAPVYk+eUIcNntGtMkUWy/6AKRCDZINCLe3kB1vHhT2vBxBF85Hh9VlPXi/qjA==

canonical-path@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d"
Expand Down Expand Up @@ -4344,6 +4353,11 @@ electron-to-chromium@^1.3.322:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz#a6f7e1c79025c2b05838e8e344f6e89eb83213a8"
integrity sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==

electron-to-chromium@^1.3.363:
version "1.3.368"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.368.tgz#d7597e04339f7ca70762031ec473d38eb2df6acb"
integrity sha512-fqzDipW3p+uDkHUHFPrdW3wINRKcJsbnJwBD7hgaQEQwcuLSvNLw6SeUp5gKDpTbmTl7zri7IZfhsdTUTnygJg==

elliptic@^6.0.0:
version "6.5.1"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b"
Expand Down Expand Up @@ -7957,6 +7971,13 @@ node-releases@^1.1.44:
dependencies:
semver "^6.3.0"

node-releases@^1.1.50:
version "1.1.50"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.50.tgz#803c40d2c45db172d0410e4efec83aa8c6ad0592"
integrity sha512-lgAmPv9eYZ0bGwUYAKlr8MG6K4CvWliWqnkcT2P8mMAgVrH3lqfBPorFlxiG1pHQnqmavJZ9vbMXUTNyMLbrgQ==
dependencies:
semver "^6.3.0"

node-sass-tilde-importer@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz#1a15105c153f648323b4347693fdb0f331bad1ce"
Expand Down