From 73fdcc62cb819d0dd7e53831ff139e0aebb94a5e Mon Sep 17 00:00:00 2001 From: Mark Monster Date: Fri, 26 Jul 2024 18:41:27 +0200 Subject: [PATCH] Use webpack5 syntax to include woff2 in bundle and remove url-loader (#2217) * Use webpack5 syntax to include woff2 in bundle and remove url-load that's no longer in use --- src/HealthChecks.UI/build/webpack.config.js | 4 +-- src/HealthChecks.UI/package-lock.json | 39 --------------------- src/HealthChecks.UI/package.json | 1 - 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/HealthChecks.UI/build/webpack.config.js b/src/HealthChecks.UI/build/webpack.config.js index 5b750346f8..5080069180 100644 --- a/src/HealthChecks.UI/build/webpack.config.js +++ b/src/HealthChecks.UI/build/webpack.config.js @@ -24,8 +24,8 @@ module.exports = { // all files with a `.ts`, `.cts`, `.mts` or `.tsx` extension will be handled by `ts-loader` { test: /\.tsx?$/, loader: "ts-loader" }, { - loader: 'url-loader', - test: /\.(png|jpg|gif|svg|woff2)$/ + test: /\.(png|jpg|gif|svg|woff2)$/, + type: 'asset/inline' }, { test: /\.css$/i, diff --git a/src/HealthChecks.UI/package-lock.json b/src/HealthChecks.UI/package-lock.json index 3394ea97a2..985ac5e68c 100644 --- a/src/HealthChecks.UI/package-lock.json +++ b/src/HealthChecks.UI/package-lock.json @@ -27,7 +27,6 @@ "ts-loader": "^9.4.2", "typescript": "5.0.4", "uglifycss": "0.0.29", - "url-loader": "4.1.0", "webpack": "5.80.0", "webpack-cli": "5.0.2" } @@ -2167,33 +2166,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.0.tgz", - "integrity": "sha512-IzgAAIC8wRrg6NYkFIJY09vtktQcsvU8V6HhtQj9PTefbYImzLB1hufqo4m+RyM5N3mLx5BqJKccgxJS+W3kqw==", - "dev": true, - "dependencies": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.26", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "file-loader": "*", - "webpack": "^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "file-loader": { - "optional": true - } - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3983,17 +3955,6 @@ "punycode": "^2.1.0" } }, - "url-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.0.tgz", - "integrity": "sha512-IzgAAIC8wRrg6NYkFIJY09vtktQcsvU8V6HhtQj9PTefbYImzLB1hufqo4m+RyM5N3mLx5BqJKccgxJS+W3kqw==", - "dev": true, - "requires": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.26", - "schema-utils": "^2.6.5" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/src/HealthChecks.UI/package.json b/src/HealthChecks.UI/package.json index 6e7813a5a5..0c5f9000fa 100644 --- a/src/HealthChecks.UI/package.json +++ b/src/HealthChecks.UI/package.json @@ -31,7 +31,6 @@ "ts-loader": "^9.4.2", "typescript": "5.0.4", "uglifycss": "0.0.29", - "url-loader": "4.1.0", "webpack": "5.80.0", "webpack-cli": "5.0.2" }