postcss-import
17.0.1 · 13 Oct 2026MIT52.1M / weekRepositoryHomepagenpmAtom feed
59 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 17.x · latest line
17.0.1
13 Oct 2026Don't hoist empty
@layerstatements that follow@layerblocksHandle uppercase/mixed-case
@importand@layerdeclarations
- 16.x
16.0.0
3 Jan 2024- Breaking
Signifigant rewrite, with small behavioral tweaks in a number of edge cases
16.0.0 / 2024-01-02
- Breaking
- Breaking
Signifigant rewrite, with small behavioral tweaks in a number of edge cases
Support for
@supportsconditional imports added (#532, #548)When
skipDuplicatesisfalse, handles import cycles correctly (#462, #535)Add
warnOnEmptyoption to allow disabling warnings for empty files (#84, #541)
- 15.x
15.1.0
7 Dec 2022Add
data:URL support (this is not useful for most consumers)
- 14.x
14.1.0
22 Mar 2022Add
@layersupport
14.0.0
14 Dec 2020- Breaking
Error if multiple incompatible
@charsetstatements - Breaking
Warn if
@charsetstatements are not at the top of files
This release should not have breaking changes for the vast majority of users; only those with
@charsetstatements in their CSS may be affected.- 13.x
- 12.x
12.0.0
4 Aug 2018Removed: Support for Node.js v4
Changed: Uses PostCSS v7 (github.com/postcss/postcss/releases/tag/7.0.0)
- 11.x
11.1.0
10 Feb 2018Added:
filteroption
11.0.0
16 Sep 2017Changed: A syntax error in an imported file now throws an error instead of just warning
Changed: Symlink handling to be consistent with Node.js
require
- 10.x
10.0.0
12 May 2017- Deprecated
Removed: deprecated
addDependencyTooption Removed: Support for Node.js versions less than 4.5.x
Changed: Upgraded to Postcss v6
Removed: Support for Node.js versions less than 4.5.x
Changed: Upgraded to Postcss v6
Removed: jspm support
- Deprecated
Removed: deprecated
addDependencyTooption Removed:
onImportoptionChanged: Doesn't depend on promise-each
- 9.x
9.1.0
10 Jan 2017Added:
addModulesDirectoriesoption
9.0.0
3 Dec 2016- Deprecated
Changed: Deprecated
addDependencyTooption, it is not needed if using
postcss-loader >= v1.0.0 Removed:
transformoptionRemoved:
pkg-resolveis no longer a dependency; this should fix some issues
with webpack. jspm users must manually installpkg-resolveif they want to
load jspm modules (see github.com/postcss/postcss-import
for more info)
Removed:
transformoptionRemoved:
pkg-resolveis no longer a dependency; this should fix some issues
with webpack. jspm users must manually installpkg-resolveif they want to
load jspm modules (see github.com/postcss/postcss-import
for more info)Changed: If a file is not found, it will now throw an error instead of just
raising a warningChanged: If a custom resolver does not return an absolute path, the default
resolver will be applied to the returned path.Changed: postcss-import will try to guess the correct parser for imported
files, based on the file extension.- Deprecated
Changed: Deprecated
addDependencyTooption, it is not needed if using
postcss-loader >= v1.0.0
- 8.x
8.2.0
10 Nov 2016Fixed: Warn about all
@imports after other CSS declarationsAdded:
dependencymessage
8.1.2
7 May 2016Fixed: prevent JSPM to throw unrecoverable error
8.1.1
4 May 2016Fixed: JSPM support
8.1.0
4 Apr 2016Added: JSPM browser field
8.0.2
27 Jan 2016Fixed: Comments between imports statements are ignored
8.0.1
27 Jan 2016Fixed: missing "lib" folder
8.0.0
27 Jan 2016Removed: 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
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
resolveoptionpostcssImport({ 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
_- 7.x
7.1.3
5 Nov 2015Fixed: ensure node 0.12 compatibility, round 2
7.1.2
5 Nov 2015Fixed: performance issue because of cloned options
7.1.1
5 Nov 2015Added: ensure node 0.12 compatibility
7.1.0
19 Oct 2015Added: option
addDependencyToto make the integration with webpack more
elegant
(ref postcss-loader#31)
7.0.0
25 Aug 2015Removed: compatibility with postcss v4.x
Added: compatibility with postcss v5.x
Added: lighter package by upgrading some dependencies
- 6.x
6.2.0
21 Jul 2015Added:
skipDuplicatesoption now allows you to not skip duplicated files
6.1.1
7 Jul 2015Fixed: Prevent mutability issue, round 2
Added:
pluginsoption, to run some postcss plugin on imported filesAdded:
bower_componentsis now part of the default paths
Fixed: Prevent mutability issue, round 2
Added:
pluginsoption, to run some postcss plugin on imported filesAdded:
bower_componentsis now part of the default pathsAdded:
asyncoption allow to use enable PostCSS async API usage.
Note that it's not enabling async fs read yet. It has been added to fix breaking
change introduced by 6.1.0.
6.1.0
7 Jul 2015This release was not respecting semver and introduced a major breaking change. It has been unpublished for now.
6.0.0
17 Jun 2015Changed: warnings messages are now using postcss message api (4.1.x)
Added: warning when a import statement has not been closed correctly
- 5.x
5.2.2
19 Apr 2015Fixed: globbed imports work for module directories
5.2.1
17 Apr 2015Fixed: glob import now works with single quote
@import
5.1.0
27 Mar 2015Added: files with the same content will only be imported once. Previously, only the full path was used to determine if a file has already been imported in a given scope.
Now, we also test create a hash with the content of the file to check if a file with the same content has not already been imported.
This might be usefull if some modules you import are importing the same library from different places (eg: normalize might be as dep for several modules located in different places innode_modules)
5.0.3
16 Feb 2015Fixed: regression of 5.0.2: AST parent references were not updated
5.0.2
14 Feb 2015Fixed: indentation and code style are now preserved
5.0.0
26 Jan 2015Added: compatibility with postcss v4.x
Removed: compatibility with postcss v3.x
Fixed: relative imports (./ and ../) should work using
pathoption only (no need forfrom)
- 4.x
4.1.1
5 Jan 2015Fixed: irregular whitespace that throw syntax error in some environnements
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.