Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: update browser build #12693

Merged
merged 1 commit into from Dec 23, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions Makefile.js
Expand Up @@ -562,19 +562,6 @@ target.karma = () => {

target.webpack("production");

const browserFileLintOutput = new CLIEngine({
platinumazure marked this conversation as resolved.
Show resolved Hide resolved
useEslintrc: false,
ignore: false,
allowInlineConfig: false,
baseConfig: { parserOptions: { ecmaVersion: 5 } }
}).executeOnFiles([`${BUILD_DIR}/eslint.js`]);

if (browserFileLintOutput.errorCount > 0) {
echo(`error: Failed to lint ${BUILD_DIR}/eslint.js as ES5 code`);
echo(CLIEngine.getFormatter("stylish")(browserFileLintOutput.results));
exit(1);
}

const lastReturn = exec(`${getBinFile("karma")} start karma.conf.js`);

if (lastReturn.code !== 0) {
Expand Down
23 changes: 21 additions & 2 deletions webpack.config.js
Expand Up @@ -17,9 +17,28 @@ module.exports = {
test: /\.m?js$/u,
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
presets: [
["@babel/preset-env", {
debug: true, // ← to print actual browser versions

/*
* We want to remove `transform-unicode-regex` convert because of https://github.com/eslint/eslint/pull/12662.
*
* With `>0.5%`, `@babel/preset-env@7.7.6` prints below:
*
* transform-unicode-regex { "chrome":"49", "ie":"11", "safari":"5.1" }
*
* So this excludes those versions:
*
* - IE 11
* - Chrome 49 (2016; the last version on Windows XP)
* - Safari 5.1 (2011-2013; the last version on Windows)
*/
targets: ">0.5%, not chrome 49, not ie 11, not safari 5.1"
}]
]
},
exclude: /node_modules\/lodash/u
exclude: /node_modules[\\/]lodash/u
}
]
},
Expand Down