postcss-import
Advanced tools
Comparing version 15.0.1 to 15.1.0
@@ -13,2 +13,3 @@ "use strict" | ||
const assignLayerNames = require("./lib/assign-layer-names") | ||
const dataURL = require("./lib/data-url") | ||
@@ -294,2 +295,10 @@ function AtImport(options) { | ||
function resolveImportId(result, stmt, options, state) { | ||
if (dataURL.isValid(stmt.uri)) { | ||
return loadImportContent(result, stmt, stmt.uri, options, state).then( | ||
result => { | ||
stmt.children = result | ||
} | ||
) | ||
} | ||
const atRule = stmt.node | ||
@@ -296,0 +305,0 @@ let sourceFile |
"use strict" | ||
const readCache = require("read-cache") | ||
const dataURL = require("./data-url") | ||
module.exports = filename => readCache(filename, "utf-8") | ||
module.exports = filename => { | ||
if (dataURL.isValid(filename)) { | ||
return dataURL.contents(filename) | ||
} | ||
return readCache(filename, "utf-8") | ||
} |
{ | ||
"name": "postcss-import", | ||
"version": "15.0.1", | ||
"version": "15.1.0", | ||
"description": "PostCSS plugin to import CSS files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
30855
12
665