]> git.proxmox.com Git - pve-eslint.git/blob - eslint/webpack.config.js
import and build new upstream release 7.2.0
[pve-eslint.git] / eslint / webpack.config.js
1 "use strict";
2
3 module.exports = {
4 mode: "none",
5 entry: {
6 eslint: ["core-js/stable", "regenerator-runtime/runtime", "./lib/linter/linter.js"]
7 },
8 output: {
9 filename: "[name].js",
10 library: "[name]",
11 libraryTarget: "umd",
12 globalObject: "this"
13 },
14 module: {
15 rules: [
16 {
17 test: /\.m?js$/u,
18 loader: "babel-loader",
19 options: {
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 ]
40 },
41 exclude: /node_modules[\\/]lodash/u
42 }
43 ]
44 },
45 resolve: {
46 mainFields: ["main", "module"]
47 },
48 stats: "errors-only"
49 };