Skip to content

Commit 2dcac11

Browse files
fix: stuff
1 parent 779de4d commit 2dcac11

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/plugins/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import postcss from 'postcss';
22
import valueParser from 'postcss-value-parser';
33
import { isUrlRequest, stringifyRequest, urlToRequest } from 'loader-utils';
44

5-
const pluginName = 'postcss-css-loader-icss-url';
5+
const pluginName = 'postcss-css-loader-url';
66

77
function normalizeUrl(url) {
88
return url.split(/(\?)?#/);

test/__snapshots__/loader.test.js.snap

-2
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,6 @@ exports[`loader error when no loader for url assets: warnings 1`] = `Array []`;
475475
exports[`loader message api: errors 1`] = `
476476
Array [
477477
[ModuleError: Module Error (from \`replaced original path\`):
478-
Error],
479-
[ModuleError: Module Error (from \`replaced original path\`):
480478
Error],
481479
]
482480
`;

test/loader.test.js

+5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ describe('loader', () => {
146146
const postcssMessageApiPlugin = postcss.plugin(
147147
'postcss-message-api',
148148
() => (root, result) => {
149+
// Pass messages only for `basic.css`
150+
if (!/basic\.css/.test(result.opts.from)) {
151+
return;
152+
}
153+
149154
result.messages.push(
150155
// Custom message
151156
{

0 commit comments

Comments
 (0)