diff --git a/package.json b/package.json index b6efc7f41..504ef8455 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/build/build.js b/scripts/build/build.js index 258f7f41f..4f6517601 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.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 ")); diff --git a/scripts/build/bundler.js b/scripts/build/bundler.js index 62a789d6c..6c25d37af 100644 --- a/scripts/build/bundler.js +++ b/scripts/build/bundler.js @@ -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 = [ [ diff --git a/scripts/build/config.js b/scripts/build/config.js index a7dcdd40f..b5161b643 100644 --- a/scripts/build/config.js +++ b/scripts/build/config.js @@ -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 } } }