Socket
Socket
Sign inDemoInstall

css-loader

Package Overview
Dependencies
95
Maintainers
7
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.5.3 to 3.6.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [3.6.0](https://github.com/webpack-contrib/css-loader/compare/v3.5.3...v3.6.0) (2020-06-13)
### Features
* allow `modules.auto` to be a filter function ([#1086](https://github.com/webpack-contrib/css-loader/issues/1086)) ([0902353](https://github.com/webpack-contrib/css-loader/commit/0902353c328d4d18e8ed2755fe9c83c03c53df81))
### [3.5.3](https://github.com/webpack-contrib/css-loader/compare/v3.5.2...v3.5.3) (2020-04-24)

@@ -7,0 +14,0 @@

3

dist/options.json

@@ -45,2 +45,5 @@ {

{
"instanceof": "Function"
},
{
"type": "boolean"

@@ -47,0 +50,0 @@ }

@@ -127,2 +127,6 @@ "use strict";

if (typeof modules.auto === 'function') {
return modules.auto(resourcePath);
}
return true;

@@ -129,0 +133,0 @@ }

30

package.json
{
"name": "css-loader",
"version": "3.5.3",
"version": "3.6.0",
"description": "css loader module for webpack",

@@ -51,3 +51,3 @@ "license": "MIT",

"normalize-path": "^3.0.0",
"postcss": "^7.0.27",
"postcss": "^7.0.32",
"postcss-modules-extract-imports": "^2.0.0",

@@ -57,10 +57,10 @@ "postcss-modules-local-by-default": "^3.0.2",

"postcss-modules-values": "^3.0.0",
"postcss-value-parser": "^4.0.3",
"schema-utils": "^2.6.6",
"postcss-value-parser": "^4.1.0",
"schema-utils": "^2.7.0",
"semver": "^6.3.0"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@commitlint/cli": "^8.3.5",

@@ -70,15 +70,15 @@ "@commitlint/config-conventional": "^8.3.4",

"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^25.4.0",
"babel-jest": "^25.5.1",
"cross-env": "^7.0.2",
"del": "^5.1.0",
"del-cli": "^3.0.0",
"del-cli": "^3.0.1",
"es-check": "^5.1.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-import": "^2.21.2",
"file-loader": "^6.0.0",
"husky": "^4.2.5",
"jest": "^25.4.0",
"lint-staged": "^10.1.7",
"memfs": "^3.1.2",
"jest": "^25.5.4",
"lint-staged": "^10.2.10",
"memfs": "^3.2.0",
"npm-run-all": "^4.1.5",

@@ -88,5 +88,5 @@ "postcss-loader": "^3.0.0",

"prettier": "^2.0.5",
"sass": "^1.26.3",
"sass": "^1.26.8",
"sass-loader": "^8.0.2",
"standard-version": "^7.1.0",
"standard-version": "^8.0.0",
"strip-ansi": "^6.0.0",

@@ -93,0 +93,0 @@ "url-loader": "^4.1.0",

@@ -545,3 +545,3 @@ <div align="center">

Type: `Boolean|RegExp`
Type: `Boolean|RegExp|Function`
Default: `'undefined'`

@@ -580,3 +580,3 @@

Enable css modules for files based on a filename and satisfying your regex.
Enable css modules for files based on the filename satisfying your regex check.

@@ -603,2 +603,26 @@ **webpack.config.js**

###### `Function`
Enable css modules for files based on the filename satisfying your filter function check.
**webpack.config.js**
```js
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
loader: 'css-loader',
options: {
modules: {
auto: (resourcePath) => resourcePath.endsWith('.custom-module.css'),
},
},
},
],
},
};
```
##### `mode`

@@ -605,0 +629,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc