mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 13:51:19 +03:00
fix(es/preset-env): Enable "mobile to desktop" (#2907)
This commit is contained in:
parent
756a9bad6a
commit
5a68a360b4
@ -590,14 +590,18 @@ impl Query {
|
||||
where
|
||||
T: AsRef<str>,
|
||||
{
|
||||
let distribs =
|
||||
browserslist::resolve(s, browserslist::Opts::new().ignore_unknown_versions(true))
|
||||
.with_context(|| {
|
||||
format!(
|
||||
"failed to resolve browserslist query: {:?}",
|
||||
s.iter().map(|v| v.as_ref()).collect::<Vec<_>>()
|
||||
)
|
||||
})?;
|
||||
let distribs = browserslist::resolve(
|
||||
s,
|
||||
browserslist::Opts::new()
|
||||
.mobile_to_desktop(true)
|
||||
.ignore_unknown_versions(true),
|
||||
)
|
||||
.with_context(|| {
|
||||
format!(
|
||||
"failed to resolve browserslist query: {:?}",
|
||||
s.iter().map(|v| v.as_ref()).collect::<Vec<_>>()
|
||||
)
|
||||
})?;
|
||||
|
||||
let versions =
|
||||
BrowserData::parse_versions(distribs).expect("failed to parse browser version");
|
||||
|
@ -1,3 +1,13 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.array.flat-map";
|
||||
import "core-js/modules/es7.object.define-getter";
|
||||
import "core-js/modules/es7.object.define-setter";
|
||||
import "core-js/modules/es7.object.lookup-getter";
|
||||
import "core-js/modules/es7.object.lookup-setter";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.string.trim-left";
|
||||
import "core-js/modules/es7.string.trim-right";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.timers";
|
||||
|
@ -1,2 +1,28 @@
|
||||
import "core-js/modules/es.array.flat";
|
||||
import "core-js/modules/es.array.flat-map";
|
||||
import "core-js/modules/es.array.iterator";
|
||||
import "core-js/modules/es.array.reduce";
|
||||
import "core-js/modules/es.array.reduce-right";
|
||||
import "core-js/modules/es.array.sort";
|
||||
import "core-js/modules/es.array.unscopables.flat";
|
||||
import "core-js/modules/es.array.unscopables.flat-map";
|
||||
import "core-js/modules/es.math.hypot";
|
||||
import "core-js/modules/es.object.define-getter";
|
||||
import "core-js/modules/es.object.define-setter";
|
||||
import "core-js/modules/es.object.from-entries";
|
||||
import "core-js/modules/es.object.lookup-getter";
|
||||
import "core-js/modules/es.object.lookup-setter";
|
||||
import "core-js/modules/es.promise";
|
||||
import "core-js/modules/es.promise.finally";
|
||||
import "core-js/modules/es.string.replace";
|
||||
import "core-js/modules/es.string.trim-end";
|
||||
import "core-js/modules/es.string.trim-start";
|
||||
import "core-js/modules/es.symbol.async-iterator";
|
||||
import "core-js/modules/es.symbol.description";
|
||||
import "core-js/modules/web.dom-collections.iterator";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.queue-microtask";
|
||||
import "core-js/modules/web.url";
|
||||
import "core-js/modules/web.url-search-params";
|
||||
import "core-js/modules/web.url.to-json";
|
||||
1 ** 2;
|
||||
|
Loading…
Reference in New Issue
Block a user