PostCSS plugin to inline @import rules content with extra features
Switch branches/tags
Clone or download
Latest commit f77a981 Jun 25, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib glob resolver looks for files in modules May 31, 2017
test upgrade tests to work with ava >=0.18 May 31, 2017
.editorconfig Initial Jan 28, 2016
.gitignore Initial Jan 28, 2016
.travis.yml Update travis node version to stable Sep 11, 2017 3.0.0 Sep 11, 2017
LICENSE Initial Jan 28, 2016 2.1.0 Jun 5, 2017
index.js Remove unnecessary file extensions Jan 11, 2017
package-lock.json postcss-import@^11.0.0 Jun 19, 2018
package.json postcss-import@^11.0.0 Jun 19, 2018
yarn.lock upgrade tests to work with ava >=0.18 May 31, 2017

postcss-easy-import Build Status

PostCSS plugin to inline @import rules content with extra features.


postcss([ require('postcss-easy-import') ])

See PostCSS docs for examples for your environment.

Resolving files with globs

The path to the file will be checked and if it contains a glob it will be used to locate it. These can be mixed and matched with normal module paths:

@import "suitcss-utils-display"; /* node_modules */
@import "./theme.css"; /* relative path */
@import "./components/*.css"; /* glob */
@import "suitcss-utils-size/lib/*.css"; /* glob inside node_modules */


This plugin is a postcss-import extension which introduces its own resolve option.


Type: false or string Default: false

Allows partial-like importing with a prefix before the filename.

@import 'modules/partial.css';
/* will import modules/_partial.css */

Prefixed versions are always favoured. Otherwise the non-prefix version is used:

├── _baz.css
├── baz.css
├── bar.css

The matched files would be ['_baz.css', 'bar.css'].


Type: array or string Default: .css

Defines file extensions which will be looked for.


MIT © Bogdan Chadkin