diff --git a/lib/parse-styles.js b/lib/parse-styles.js index 1526f974..c86441a9 100644 --- a/lib/parse-styles.js +++ b/lib/parse-styles.js @@ -97,6 +97,12 @@ async function resolveImportId(result, stmt, options, state, postcss) { // and the current statement doesn't have a data url // we set the conditions to `not all`. stmt.media = ["not all"] + result.warn( + `Unable to import '${stmt.uri}' from a stylesheet embedded in a data url`, + { + node: stmt.node, + } + ) return } diff --git a/test/data-url.js b/test/data-url.js index 13af7d8d..bc3334a2 100644 --- a/test/data-url.js +++ b/test/data-url.js @@ -5,4 +5,6 @@ const test = require("ava") // internal tooling const checkFixture = require("./helpers/check-fixture") -test("should inline data urls", checkFixture, "data-url") +test("should inline data urls", checkFixture, "data-url", null, null, [ + `Unable to import 'foo.css' from a stylesheet embedded in a data url`, +])