postcss-import
17.0.1 · 13 Oct 2026MIT52.1M / weekRepositoryHomepagenpmAtom feed
8.2.0 is the newest release of 8.x.
In short
2 new9 changed
Release note
All imports statements must be at the top of your file now, per CSS specification.
You should use postcss-reporter to see the warnings raised.
Removed: async mode/option (now async by default)
Removed: "bower_components" not supported by default anymore,
use "path" option to add it backRemoved:
encodingoption. Encoding can be specified in customloadoption
postcssImport({
load: function(filename) {
return fs.readFileSync(filename, "utf-8")
}
})Removed: glob support
Globs can be implemented with custom resolve option
postcssImport({
resolve: function(id, base) {
return glob.sync(path.join(base, id))
}
})Changed: custom resolve has more responsibility for paths resolving.
See resolve option
for more information about this changeChanged: support promise in
transformoption andundefinedresult will be
skippedChanged:
options.pluginsare applied to unprocessed ast before imports
detecting
(157)Added: custom resolve function can return array of paths
Added: custom syntax in imported files support
Added: support custom
loadoptionAdded: detect css extension in package.json
mainfield
(153)
Note:
_If you miss options/default behavior (glob etc), a new plugin will handle all
those things.
Please follow issue #145
_
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.