Skip to content

Commit 4e16957

Browse files
mysticateaKai Cataldo
authored and
Kai Cataldo
committedDec 23, 2019
Build: update browser build (#12693)
1 parent 00ddfff commit 4e16957

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed
 

‎Makefile.js

-13
Original file line numberDiff line numberDiff line change
@@ -562,19 +562,6 @@ target.karma = () => {
562562

563563
target.webpack("production");
564564

565-
const browserFileLintOutput = new CLIEngine({
566-
useEslintrc: false,
567-
ignore: false,
568-
allowInlineConfig: false,
569-
baseConfig: { parserOptions: { ecmaVersion: 5 } }
570-
}).executeOnFiles([`${BUILD_DIR}/eslint.js`]);
571-
572-
if (browserFileLintOutput.errorCount > 0) {
573-
echo(`error: Failed to lint ${BUILD_DIR}/eslint.js as ES5 code`);
574-
echo(CLIEngine.getFormatter("stylish")(browserFileLintOutput.results));
575-
exit(1);
576-
}
577-
578565
const lastReturn = exec(`${getBinFile("karma")} start karma.conf.js`);
579566

580567
if (lastReturn.code !== 0) {

‎webpack.config.js

+21-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,28 @@ module.exports = {
1717
test: /\.m?js$/u,
1818
loader: "babel-loader",
1919
options: {
20-
presets: ["@babel/preset-env"]
20+
presets: [
21+
["@babel/preset-env", {
22+
debug: true, // ← to print actual browser versions
23+
24+
/*
25+
* We want to remove `transform-unicode-regex` convert because of https://github.com/eslint/eslint/pull/12662.
26+
*
27+
* With `>0.5%`, `@babel/preset-env@7.7.6` prints below:
28+
*
29+
* transform-unicode-regex { "chrome":"49", "ie":"11", "safari":"5.1" }
30+
*
31+
* So this excludes those versions:
32+
*
33+
* - IE 11
34+
* - Chrome 49 (2016; the last version on Windows XP)
35+
* - Safari 5.1 (2011-2013; the last version on Windows)
36+
*/
37+
targets: ">0.5%, not chrome 49, not ie 11, not safari 5.1"
38+
}]
39+
]
2140
},
22-
exclude: /node_modules\/lodash/u
41+
exclude: /node_modules[\\/]lodash/u
2342
}
2443
]
2544
},

0 commit comments

Comments
 (0)
Please sign in to comment.