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: v5.1.0
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: v5.1.1
Choose a head ref
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on Mar 1, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d2a1a84 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
    5e18d7e View commit details
Showing with 36 additions and 8 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 package-lock.json
  3. +1 −1 package.json
  4. +5 −1 src/plugins/postcss-import-parser.js
  5. +4 −2 src/plugins/postcss-url-parser.js
  6. +10 −2 test/__snapshots__/loader.test.js.snap
  7. +8 −1 test/fixtures/webpackIgnore.css
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.

### [5.1.1](https://github.com/webpack-contrib/css-loader/compare/v5.1.0...v5.1.1) (2021-03-01)


### Bug Fixes

* crash on modified AST from `postcss-loader` ([#1268](https://github.com/webpack-contrib/css-loader/issues/1268)) ([d2a1a84](https://github.com/webpack-contrib/css-loader/commit/d2a1a84afc63fdfb2a4ce6668ed9f2d7f1ba56ca))

## [5.1.0](https://github.com/webpack-contrib/css-loader/compare/v5.0.2...v5.1.0) (2021-02-25)


2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-loader",
"version": "5.1.0",
"version": "5.1.1",
"description": "css loader module for webpack",
"license": "MIT",
"repository": "webpack-contrib/css-loader",
6 changes: 5 additions & 1 deletion src/plugins/postcss-import-parser.js
Original file line number Diff line number Diff line change
@@ -14,7 +14,11 @@ function visitor(result, parsedResults, node, key) {
return;
}

if (node.raws.afterName && node.raws.afterName.trim().length > 0) {
if (
node.raws &&
node.raws.afterName &&
node.raws.afterName.trim().length > 0
) {
const lastCommentIndex = node.raws.afterName.lastIndexOf("/*");
const matched = node.raws.afterName
.slice(lastCommentIndex)
6 changes: 4 additions & 2 deletions src/plugins/postcss-url-parser.js
Original file line number Diff line number Diff line change
@@ -68,12 +68,14 @@ function visitor(result, parsedResults, node, key) {
}

const parsed = valueParser(
typeof node.raws.value === "undefined" ? node[key] : node.raws.value.raw
node.raws && node.raws.value && node.raws.value.raw
? node.raws.value.raw
: node[key]
);

let inBetween;

if (typeof node.raws.between !== "undefined") {
if (node.raws && node.raws.between) {
const lastCommentIndex = node.raws.between.lastIndexOf("/*");

const matched = node.raws.between
Loading