forked from eslint/eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
49 lines (47 loc) · 1.69 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"use strict";
module.exports = {
mode: "none",
entry: {
eslint: ["core-js/stable", "regenerator-runtime/runtime", "./lib/linter/linter.js"]
},
output: {
filename: "[name].js",
library: "[name]",
libraryTarget: "umd",
globalObject: "this"
},
module: {
rules: [
{
test: /\.m?js$/u,
loader: "babel-loader",
options: {
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/[email protected]` 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
}
]
},
resolve: {
mainFields: ["browser", "main", "module"]
},
stats: "errors-only"
};