Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack-contrib/css-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.5.3
Choose a base ref
...
head repository: webpack-contrib/css-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.6.0
Choose a head ref
  • 4 commits
  • 11 files changed
  • 3 contributors

Commits on Jun 3, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    benjamn Ben Newman
    Copy the full SHA
    505d2e6 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0902353 View commit details

Commits on Jun 13, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c4db6ff View commit details
  2. chore(release): 3.6.0

    alexander-akait committed Jun 13, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    22e16e2 View commit details
Showing with 2,941 additions and 2,418 deletions.
  1. +5 −0 .github/workflows/nodejs.yml
  2. +7 −0 CHANGELOG.md
  3. +26 −2 README.md
  4. +2,747 −2,381 package-lock.json
  5. +15 −15 package.json
  6. +3 −0 src/options.json
  7. +4 −0 src/utils.js
  8. +75 −16 test/__snapshots__/modules-option.test.js.snap
  9. +14 −0 test/__snapshots__/validate-options.test.js.snap
  10. +40 −4 test/modules-option.test.js
  11. +5 −0 test/validate-options.test.js
5 changes: 5 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -58,6 +58,11 @@ jobs:
node-version: [8.x, 10.x, 12.x, 14.x]
webpack-version: [latest, next]

exclude:
# Webpack 5 does not support node 8
- node-version: 8.x
webpack-version: next

runs-on: ${{ matrix.os }}

steps:
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [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)


28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -542,7 +542,7 @@ module.exports = {

##### `auto`

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

Allows auto enable css modules based on filename.
@@ -576,7 +576,7 @@ module.exports = {

###### `RegExp`

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.

**webpack.config.js**

@@ -598,6 +598,30 @@ module.exports = {
};
```

###### `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`

Type: `String|Function`
Loading