css-loader
Advanced tools
Comparing version 5.1.1 to 5.1.2
@@ -5,2 +5,10 @@ # Changelog | ||
### [5.1.2](https://github.com/webpack-contrib/css-loader/compare/v5.1.1...v5.1.2) (2021-03-10) | ||
### Bug Fixes | ||
* handling `@import` with spaces before and after and any extensions ([#1272](https://github.com/webpack-contrib/css-loader/issues/1272)) ([0c47cf7](https://github.com/webpack-contrib/css-loader/commit/0c47cf7ccbe3635900e8e8840650f69a7eca004d)) | ||
* inline loader syntax in `@import` and modules ([3f49ed0](https://github.com/webpack-contrib/css-loader/commit/3f49ed0864457f9467f560856377c890c392aee7)) | ||
### [5.1.1](https://github.com/webpack-contrib/css-loader/compare/v5.1.0...v5.1.1) (2021-03-01) | ||
@@ -7,0 +15,0 @@ |
@@ -66,4 +66,3 @@ "use strict"; | ||
mainFields: ["css", "style", "main", "..."], | ||
mainFiles: ["index", "..."], | ||
restrictions: [/\.css$/i] | ||
mainFiles: ["index", "..."] | ||
}); | ||
@@ -77,3 +76,3 @@ plugins.push((0, _plugins.importParser)({ | ||
resolver, | ||
urlHandler: url => (0, _loaderUtils.stringifyRequest)(this, (0, _utils.getPreRequester)(this)(options.importLoaders) + url) | ||
urlHandler: url => (0, _loaderUtils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url)) | ||
})); | ||
@@ -120,3 +119,3 @@ } | ||
resolver: icssResolver, | ||
urlHandler: url => (0, _loaderUtils.stringifyRequest)(this, (0, _utils.getPreRequester)(this)(options.importLoaders) + url) | ||
urlHandler: url => (0, _loaderUtils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url)) | ||
})); | ||
@@ -123,0 +122,0 @@ } // Reuse CSS AST (PostCSS AST e.g 'postcss-loader') to avoid reparsing |
@@ -24,2 +24,3 @@ "use strict"; | ||
exports.sort = sort; | ||
exports.combineRequests = combineRequests; | ||
exports.webpackIgnoreCommentRegexp = void 0; | ||
@@ -104,3 +105,3 @@ | ||
function normalizeUrl(url, isStringValue) { | ||
let normalizedUrl = url; | ||
let normalizedUrl = url.replace(/^( |\t\n|\r\n|\r|\f)*/g, "").replace(/( |\t\n|\r\n|\r|\f)*$/g, ""); | ||
@@ -648,2 +649,7 @@ if (isStringValue && /\\(\n|\r\n|\r|\f)/.test(normalizedUrl)) { | ||
return a.index - b.index; | ||
} | ||
function combineRequests(preRequest, url) { | ||
const idx = url.indexOf("!=!"); | ||
return idx !== -1 ? url.slice(0, idx + 3) + preRequest + url.slice(idx + 3) : preRequest + url; | ||
} |
{ | ||
"name": "css-loader", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "css loader module for webpack", | ||
@@ -36,4 +36,3 @@ "license": "MIT", | ||
"prepare": "npm run build", | ||
"release": "standard-version", | ||
"defaults": "webpack-defaults" | ||
"release": "standard-version" | ||
}, | ||
@@ -51,3 +50,3 @@ "files": [ | ||
"loader-utils": "^2.0.0", | ||
"postcss": "^8.2.6", | ||
"postcss": "^8.2.8", | ||
"postcss-modules-extract-imports": "^3.0.0", | ||
@@ -62,8 +61,7 @@ "postcss-modules-local-by-default": "^4.0.0", | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.17", | ||
"@babel/core": "^7.12.17", | ||
"@babel/preset-env": "^7.12.17", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@webpack-contrib/defaults": "^6.3.0", | ||
"@babel/cli": "^7.13.10", | ||
"@babel/core": "^7.13.10", | ||
"@babel/preset-env": "^7.13.10", | ||
"@commitlint/cli": "^12.0.1", | ||
"@commitlint/config-conventional": "^12.0.1", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
@@ -74,5 +72,5 @@ "babel-jest": "^26.6.3", | ||
"del-cli": "^3.0.1", | ||
"es-check": "^5.2.0", | ||
"eslint": "^7.20.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"es-check": "^5.2.3", | ||
"eslint": "^7.21.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
@@ -86,3 +84,3 @@ "file-loader": "^6.2.0", | ||
"memfs": "^3.2.0", | ||
"mini-css-extract-plugin": "^1.3.8", | ||
"mini-css-extract-plugin": "^1.3.9", | ||
"npm-run-all": "^4.1.5", | ||
@@ -100,3 +98,3 @@ "postcss-loader": "^4.0.4", | ||
"url-loader": "^4.1.1", | ||
"webpack": "^5.23.0" | ||
"webpack": "^5.24.4" | ||
}, | ||
@@ -103,0 +101,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128480
35
1567
Updatedpostcss@^8.2.8