From d4beb3a3cc2928a33a89bce6be1b084a65998bbd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Dec 2022 11:03:34 +0300 Subject: webpack: minify using esbuild --- package-lock.json | 574 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + webpack.config.js | 27 ++- 3 files changed, 600 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 00790a85..8b3c8971 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "core-js": "^3.26.1", "cross-env": "^7.0.3", "cssnano": "^5.1.14", + "esbuild": "^0.16.2", "eslint": "8.29.0", "eslint-plugin-jsdoc": "^39.6.4", "eslint-plugin-only-ascii": "0.0.0", @@ -1963,6 +1964,358 @@ "node": "^14 || ^16 || ^17 || ^18 || ^19" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.2.tgz", + "integrity": "sha512-t8zq/Ad8njye3tYkbdBYAEGBExCyqFuPnKmKgLBF9+nIwAS/V3FYck6BjAx813JCGXkNsR1iriS8jQFwydT+FA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.2.tgz", + "integrity": "sha512-3CjbygjFHmtxDW59FOUM1T28G+aVqzbM+cNNinMgRUq+bmAstJdqmJL/KqpUwuCRTri4BgHJRWQbHOQFLwIpxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.2.tgz", + "integrity": "sha512-J5pzzVs9gHRQff8vUBhGMRQU1avwD9IVTSfzhdnKRqlxq0hsdcgZxH95Ckj/q2KJ4nMPYfDBSRXrrvQ4PyMpFA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.2.tgz", + "integrity": "sha512-XmjlYmR1UTEdMT2X3TxnA0hG8zOi3q/BzqNN6/PDBxw/UxE9gdj7LGwiQus5HHZM03vSvjRO7WJ7qaJBGBWnpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.2.tgz", + "integrity": "sha512-nq5cXgzbXHhBqZEPpuXrf2+BV6QWUM8vAyT/ElJrdIkoGOHwNQJEqZHl3KOWK+1V3KXEXgJhh7DsLixIc677ZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.2.tgz", + "integrity": "sha512-1QuZr7GnoipDYMFJDucqXmVvJZidZuHbvw5QLzBehYq67GR1Jub9pSo6O0Rt4LtKnu3TF2K/bjgzPJAGFY6W4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.2.tgz", + "integrity": "sha512-uvbv99Wg2T489bqUz4gYVb2IpSSZZP/uTkaZpaLN+h3x58FmsLT4o7bF1Refd2JIKuONxSobljlk5/K/RD9SsQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.2.tgz", + "integrity": "sha512-8n2UozHygOGXzgysim6GifKjv+lW4fs3mlfaoKerwBIOT9OBCo1Q4AjvbtU3F+2AGyo8eavxnj6Xxx0DRTOwiw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.2.tgz", + "integrity": "sha512-S7EwMhEUMzYfd9KTHJX7Y3bKz7/9sZDRJPp10EOQ3Qqp10WvX2G42Q2c7rfymnm9aM5ZWs+W8WgbLFAUnjC3Wg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.2.tgz", + "integrity": "sha512-TRz3MDvv65zXZ4NTJYi1yyVj17Qrsm8y6J8r4qIdd2qszRLPHmte4LAazPa7g+To6QfM2kL3gHmVhwV6GcYz0g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.2.tgz", + "integrity": "sha512-yhHJCvPQjh/8wLEk336QzXMHYnMKJdzLcNAnXwVawSvsLqyzTYrGshrO1YMhzs5cWgR75DFNnhcAFgEtleAZOw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.2.tgz", + "integrity": "sha512-YwMpV41qIKRHASV4MaaA/PKk9CoZ4QyVyPXhUtLTO9kPWtWECRI4MTBrGIb9kGUpL6I+jiT4fAZn8YpWSGBkQg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.2.tgz", + "integrity": "sha512-s4YuINcRxCA9TElEf2iBdG6oZWdNu2Eb6R9TbRBcZOTdcgdBKIinaVyEiQ8H6nmCafWCuuJT8u66zds2ET3t1Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.2.tgz", + "integrity": "sha512-oacL6QGqVRhBCbBlFxODYfcCkB6tPmfanaWnsuHNI7m9LVkBuuDKpsC3XWOwkEQiLIJcvhhZKOkkgw49KxS1Dw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.2.tgz", + "integrity": "sha512-5ifr0lshZbLI457Qe6y3MsDYv1cSOJ8awgi0HT14cS59WliT7bDkrr3kmDw/LqGOAPyDvDD+U8s2cFBSENetuA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.2.tgz", + "integrity": "sha512-TA/ORYlP6h2pfB/dzrPTMFWd1MaUYy7kwblWdzwkUtsTAJAKJlZwBhkKftSaUNNU5wtXNJ9+ucMDf7vBPbDjlw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.2.tgz", + "integrity": "sha512-oBH2Aj4fL9FLlkIi2wYGckydKHVKmYrqiqt91i6kFE1mF7B05YYttrlOHAf3JzWIJQWyvzvsmoA/XFPf1sTgBw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.2.tgz", + "integrity": "sha512-eKOpYr7CiF9GZxu18iOQGfzQ4htO6KGhXriW2raJvRO0G27Lu7ArAI/kW71yTPaFqlf9gCmCGaTPr2tmiUePVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.2.tgz", + "integrity": "sha512-1HsQLVnjhlscekE8H5Xj49xPvd0c74eoZEjh+OUnr+x7vCXdTVdFDgao9QM0H9zfioxJN1ZH7534LwxEaAWaIA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.2.tgz", + "integrity": "sha512-G9AWjsnVxGQj8z0WgaDwTKgXzwc9zLPYDFoLE4oAGI/TQnft0eQjc+CKiWRyoa+a/c3XIFGXoWnW+17kbibSfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.2.tgz", + "integrity": "sha512-UJqmfPsiSX/wP1kY5JMordRqNU2r8n8ieXmNimp4r35sQEX3bjnSkPJ2E8BM8W8ecmEL+oDjYjulkTT3zSPa1g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.2.tgz", + "integrity": "sha512-1+PQiGAbbGlIXXlp9i/5JRpodCsozGTjffaD4W1LgeoynWef38VD8NNC8yG366NYXHHHLR1pN6MQZ9r2na/S1A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", @@ -3621,6 +3974,43 @@ "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "node_modules/esbuild": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.2.tgz", + "integrity": "sha512-Rv/CJquZKE00irDLDpk9jmWmtxx1NW+MGpBbNNouaDY0oBwk806uJ51WpLaJBQUxhZqLauX2rrNol5lVQceHJw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.16.2", + "@esbuild/android-arm64": "0.16.2", + "@esbuild/android-x64": "0.16.2", + "@esbuild/darwin-arm64": "0.16.2", + "@esbuild/darwin-x64": "0.16.2", + "@esbuild/freebsd-arm64": "0.16.2", + "@esbuild/freebsd-x64": "0.16.2", + "@esbuild/linux-arm": "0.16.2", + "@esbuild/linux-arm64": "0.16.2", + "@esbuild/linux-ia32": "0.16.2", + "@esbuild/linux-loong64": "0.16.2", + "@esbuild/linux-mips64el": "0.16.2", + "@esbuild/linux-ppc64": "0.16.2", + "@esbuild/linux-riscv64": "0.16.2", + "@esbuild/linux-s390x": "0.16.2", + "@esbuild/linux-x64": "0.16.2", + "@esbuild/netbsd-x64": "0.16.2", + "@esbuild/openbsd-x64": "0.16.2", + "@esbuild/sunos-x64": "0.16.2", + "@esbuild/win32-arm64": "0.16.2", + "@esbuild/win32-ia32": "0.16.2", + "@esbuild/win32-x64": "0.16.2" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -9578,6 +9968,160 @@ "jsdoc-type-pratt-parser": "~3.1.0" } }, + "@esbuild/android-arm": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.2.tgz", + "integrity": "sha512-t8zq/Ad8njye3tYkbdBYAEGBExCyqFuPnKmKgLBF9+nIwAS/V3FYck6BjAx813JCGXkNsR1iriS8jQFwydT+FA==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.2.tgz", + "integrity": "sha512-3CjbygjFHmtxDW59FOUM1T28G+aVqzbM+cNNinMgRUq+bmAstJdqmJL/KqpUwuCRTri4BgHJRWQbHOQFLwIpxw==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.2.tgz", + "integrity": "sha512-J5pzzVs9gHRQff8vUBhGMRQU1avwD9IVTSfzhdnKRqlxq0hsdcgZxH95Ckj/q2KJ4nMPYfDBSRXrrvQ4PyMpFA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.2.tgz", + "integrity": "sha512-XmjlYmR1UTEdMT2X3TxnA0hG8zOi3q/BzqNN6/PDBxw/UxE9gdj7LGwiQus5HHZM03vSvjRO7WJ7qaJBGBWnpQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.2.tgz", + "integrity": "sha512-nq5cXgzbXHhBqZEPpuXrf2+BV6QWUM8vAyT/ElJrdIkoGOHwNQJEqZHl3KOWK+1V3KXEXgJhh7DsLixIc677ZQ==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.2.tgz", + "integrity": "sha512-1QuZr7GnoipDYMFJDucqXmVvJZidZuHbvw5QLzBehYq67GR1Jub9pSo6O0Rt4LtKnu3TF2K/bjgzPJAGFY6W4Q==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.2.tgz", + "integrity": "sha512-uvbv99Wg2T489bqUz4gYVb2IpSSZZP/uTkaZpaLN+h3x58FmsLT4o7bF1Refd2JIKuONxSobljlk5/K/RD9SsQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.2.tgz", + "integrity": "sha512-8n2UozHygOGXzgysim6GifKjv+lW4fs3mlfaoKerwBIOT9OBCo1Q4AjvbtU3F+2AGyo8eavxnj6Xxx0DRTOwiw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.2.tgz", + "integrity": "sha512-S7EwMhEUMzYfd9KTHJX7Y3bKz7/9sZDRJPp10EOQ3Qqp10WvX2G42Q2c7rfymnm9aM5ZWs+W8WgbLFAUnjC3Wg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.2.tgz", + "integrity": "sha512-TRz3MDvv65zXZ4NTJYi1yyVj17Qrsm8y6J8r4qIdd2qszRLPHmte4LAazPa7g+To6QfM2kL3gHmVhwV6GcYz0g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.2.tgz", + "integrity": "sha512-yhHJCvPQjh/8wLEk336QzXMHYnMKJdzLcNAnXwVawSvsLqyzTYrGshrO1YMhzs5cWgR75DFNnhcAFgEtleAZOw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.2.tgz", + "integrity": "sha512-YwMpV41qIKRHASV4MaaA/PKk9CoZ4QyVyPXhUtLTO9kPWtWECRI4MTBrGIb9kGUpL6I+jiT4fAZn8YpWSGBkQg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.2.tgz", + "integrity": "sha512-s4YuINcRxCA9TElEf2iBdG6oZWdNu2Eb6R9TbRBcZOTdcgdBKIinaVyEiQ8H6nmCafWCuuJT8u66zds2ET3t1Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.2.tgz", + "integrity": "sha512-oacL6QGqVRhBCbBlFxODYfcCkB6tPmfanaWnsuHNI7m9LVkBuuDKpsC3XWOwkEQiLIJcvhhZKOkkgw49KxS1Dw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.2.tgz", + "integrity": "sha512-5ifr0lshZbLI457Qe6y3MsDYv1cSOJ8awgi0HT14cS59WliT7bDkrr3kmDw/LqGOAPyDvDD+U8s2cFBSENetuA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.2.tgz", + "integrity": "sha512-TA/ORYlP6h2pfB/dzrPTMFWd1MaUYy7kwblWdzwkUtsTAJAKJlZwBhkKftSaUNNU5wtXNJ9+ucMDf7vBPbDjlw==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.2.tgz", + "integrity": "sha512-oBH2Aj4fL9FLlkIi2wYGckydKHVKmYrqiqt91i6kFE1mF7B05YYttrlOHAf3JzWIJQWyvzvsmoA/XFPf1sTgBw==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.2.tgz", + "integrity": "sha512-eKOpYr7CiF9GZxu18iOQGfzQ4htO6KGhXriW2raJvRO0G27Lu7ArAI/kW71yTPaFqlf9gCmCGaTPr2tmiUePVg==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.2.tgz", + "integrity": "sha512-1HsQLVnjhlscekE8H5Xj49xPvd0c74eoZEjh+OUnr+x7vCXdTVdFDgao9QM0H9zfioxJN1ZH7534LwxEaAWaIA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.2.tgz", + "integrity": "sha512-G9AWjsnVxGQj8z0WgaDwTKgXzwc9zLPYDFoLE4oAGI/TQnft0eQjc+CKiWRyoa+a/c3XIFGXoWnW+17kbibSfA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.2.tgz", + "integrity": "sha512-UJqmfPsiSX/wP1kY5JMordRqNU2r8n8ieXmNimp4r35sQEX3bjnSkPJ2E8BM8W8ecmEL+oDjYjulkTT3zSPa1g==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.2.tgz", + "integrity": "sha512-1+PQiGAbbGlIXXlp9i/5JRpodCsozGTjffaD4W1LgeoynWef38VD8NNC8yG366NYXHHHLR1pN6MQZ9r2na/S1A==", + "dev": true, + "optional": true + }, "@eslint/eslintrc": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", @@ -10807,6 +11351,36 @@ "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "esbuild": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.2.tgz", + "integrity": "sha512-Rv/CJquZKE00irDLDpk9jmWmtxx1NW+MGpBbNNouaDY0oBwk806uJ51WpLaJBQUxhZqLauX2rrNol5lVQceHJw==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.16.2", + "@esbuild/android-arm64": "0.16.2", + "@esbuild/android-x64": "0.16.2", + "@esbuild/darwin-arm64": "0.16.2", + "@esbuild/darwin-x64": "0.16.2", + "@esbuild/freebsd-arm64": "0.16.2", + "@esbuild/freebsd-x64": "0.16.2", + "@esbuild/linux-arm": "0.16.2", + "@esbuild/linux-arm64": "0.16.2", + "@esbuild/linux-ia32": "0.16.2", + "@esbuild/linux-loong64": "0.16.2", + "@esbuild/linux-mips64el": "0.16.2", + "@esbuild/linux-ppc64": "0.16.2", + "@esbuild/linux-riscv64": "0.16.2", + "@esbuild/linux-s390x": "0.16.2", + "@esbuild/linux-x64": "0.16.2", + "@esbuild/netbsd-x64": "0.16.2", + "@esbuild/openbsd-x64": "0.16.2", + "@esbuild/sunos-x64": "0.16.2", + "@esbuild/win32-arm64": "0.16.2", + "@esbuild/win32-ia32": "0.16.2", + "@esbuild/win32-x64": "0.16.2" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", diff --git a/package.json b/package.json index c1c25d6e..48a7409d 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "core-js": "^3.26.1", "cross-env": "^7.0.3", "cssnano": "^5.1.14", + "esbuild": "^0.16.2", "eslint": "8.29.0", "eslint-plugin-jsdoc": "^39.6.4", "eslint-plugin-only-ascii": "0.0.0", diff --git a/webpack.config.js b/webpack.config.js index a9329712..a2da5786 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const ESLintPlugin = require('eslint-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); module.exports = (env, argv) => { const node_env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; @@ -41,10 +42,32 @@ module.exports = (env, argv) => { } }; if (dev) { - config.plugins.push(new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false })); + config.plugins.push( + new ESLintPlugin({ + files: 'src/main/assets', + lintDirtyModulesOnly: true, + failOnWarning: false, + failOnError: true, + fix: false + })); } config.optimization = { - minimize: !dev + minimize: !dev, + minimizer: [ + new TerserPlugin({ + minify: TerserPlugin.esbuildMinify, + // `terserOptions` options will be passed to `esbuild` + // Link to options - https://esbuild.github.io/api/#minify + // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use: + // terserOptions: { + // minify: false, + // minifyWhitespace: true, + // minifyIdentifiers: false, + // minifySyntax: true, + // }, + terserOptions: {}, + }), + ] }; return config; }; -- cgit v1.2.3