Update babel target (#7418)
This commit is contained in:
1 parent
4a4bd249c6
commit
23079c461e
4 files changed
+11
-5
No files matched your search
+1
-1
@@ -125,7 +125,7 @@
|
||||
"lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
|
||||
"lint-changelog": "node ./scripts/lint-changelog.js",
|
||||
"lint-docs": "prettier {.,docs,website,website/blog,changelog_unreleased,changelog_unreleased/*}/*.md --check",
|
||||
"lint-dist": "eslint --no-eslintrc --no-ignore --env=browser \"dist/!(bin-prettier|index|third-party).js\"",
|
||||
"lint-dist": "eslint --no-eslintrc --no-ignore --env=es6,browser \"dist/!(bin-prettier|index|third-party).js\"",
|
||||
"build": "node --max-old-space-size=3072 ./scripts/build/build.js",
|
||||
"build-docs": "node ./scripts/build-docs.js",
|
||||
"check-deps": "node ./scripts/check-deps.js",
|
||||
|
||||
@@ -98,7 +98,7 @@ async function run(params) {
|
||||
await execa("rm", ["-rf", ".cache"]);
|
||||
}
|
||||
|
||||
const bundleCache = new Cache(".cache/", "v20");
|
||||
const bundleCache = new Cache(".cache/", "v21");
|
||||
await bundleCache.load();
|
||||
|
||||
console.log(chalk.inverse(" Building packages "));
|
||||
|
||||
@@ -50,8 +50,12 @@ function getBabelConfig(bundle) {
|
||||
}
|
||||
const targets = { node: "10" };
|
||||
if (bundle.target === "universal") {
|
||||
// From https://jamie.build/last-2-versions
|
||||
targets.browsers = [">0.25%", "not ie 11", "not op_mini all"];
|
||||
targets.browsers = [
|
||||
">0.5%",
|
||||
"not ie 11",
|
||||
"not safari 5.1",
|
||||
"not op_mini all"
|
||||
];
|
||||
}
|
||||
config.presets = [
|
||||
[
|
||||
|
||||
@@ -71,7 +71,9 @@ const parsers = [
|
||||
terserOptions: {
|
||||
mangle: {
|
||||
// postcss need keep_fnames when minify
|
||||
keep_fnames: true
|
||||
keep_fnames: true,
|
||||
// we don't transform class anymore, so we need keep_classnames too
|
||||
keep_classnames: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user