Skip to content

Commit a1abd3c

Browse files
cap-Bernarditoalexander-akait
authored andcommitted
feat: added data URLs import with new URL
1 parent ac5ad35 commit a1abd3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/plugins/postcss-url-parser.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,6 @@ const plugin = (options = {}) => {
304304
parsedDeclarations.map(async (parsedDeclaration) => {
305305
const { url } = parsedDeclaration;
306306

307-
if (isDataUrl(url)) {
308-
return parsedDeclaration;
309-
}
310-
311307
if (options.filter) {
312308
const needKeep = await options.filter(url);
313309

@@ -317,6 +313,11 @@ const plugin = (options = {}) => {
317313
}
318314
}
319315

316+
if (isDataUrl(url)) {
317+
// eslint-disable-next-line consistent-return
318+
return parsedDeclaration;
319+
}
320+
320321
const splittedUrl = url.split(/(\?)?#/);
321322
const [pathname, query, hashOrQuery] = splittedUrl;
322323

0 commit comments

Comments
 (0)