From 26e04ef97f00aa1b2bd7e5084227b3a0696a0217 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 14 May 2024 18:59:41 +0530 Subject: [PATCH] css-loader upgrade and configure --- package-lock.json | 53 +++++++++++++++++------------------------- package.json | 2 +- webpack/rules/fonts.js | 4 ++-- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index dde9fd55..7ffff063 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "case-sensitive-paths-webpack-plugin": "^2.4.0", "copy-webpack-plugin": "^12.0.2", "cross-env": "^7.0.3", - "css-loader": "^5.2.6", + "css-loader": "^7.1.1", "css-minimizer-webpack-plugin": "^7.0.0", "eslint": "^9.2.0", "eslint-config-airbnb-base": "^15.0.0", @@ -7943,31 +7943,38 @@ } }, "node_modules/css-loader": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.6.tgz", - "integrity": "sha512-0wyN5vXMQZu6BvjbrPdUJvkCzGEO24HC7IS7nW4llc6BBFC+zwR9CKtYGv63Puzsg10L/o12inMY5/2ByzfD6w==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.1.tgz", + "integrity": "sha512-OxIR5P2mjO1PSXk44bWuQ8XtMK4dpEqpIyERCx3ewOo3I8EmbcxMPUc5ScLtQfgXtOojoMv57So4V/C02HQLsw==", "dev": true, "dependencies": { "icss-utils": "^5.1.0", - "loader-utils": "^2.0.0", - "postcss": "^8.2.15", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.0", - "postcss-modules-scope": "^3.0.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.1.0", - "schema-utils": "^3.0.0", - "semver": "^7.3.5" + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^4.27.0 || ^5.0.0" + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/css-loader/node_modules/lru-cache": { @@ -7982,24 +7989,6 @@ "node": ">=10" } }, - "node_modules/css-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/css-loader/node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", diff --git a/package.json b/package.json index 1b6d4b40..10231df5 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "case-sensitive-paths-webpack-plugin": "^2.4.0", "copy-webpack-plugin": "^12.0.2", "cross-env": "^7.0.3", - "css-loader": "^5.2.6", + "css-loader": "^7.1.1", "css-minimizer-webpack-plugin": "^7.0.0", "eslint": "^9.2.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/webpack/rules/fonts.js b/webpack/rules/fonts.js index 69e52a01..961646f3 100755 --- a/webpack/rules/fonts.js +++ b/webpack/rules/fonts.js @@ -1,5 +1,5 @@ module.exports = { test: /\.(eot|svg|ttf|woff|woff2)$/, exclude : /(node_modules)/, - use : ['file-loader'], -}; + type: 'asset/resource', +}; \ No newline at end of file