# postcss-easy-import

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

Latest version **4.0.0** (published 2022-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-easy-import
pnpm add postcss-easy-import
yarn add postcss-easy-import
bun add postcss-easy-import
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2022-02-25 |
| First published | 2016-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 7 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 198 |
| Author | Bogdan Chadkin |
| Maintainers | trysound, simonsmith |
| Keywords | postcss, css, postcss-plugin, import, glob, partial |

## Links

- npm: https://www.npmjs.com/package/postcss-easy-import
- Repository: https://github.com/TrySound/postcss-easy-import
- Issues: https://github.com/TrySound/postcss-easy-import/issues
- npm.io page: https://npm.io/package/postcss-easy-import

## Dependencies (7)

- [pify](https://npm.io/package/pify.md) ^3.0.0
- [globby](https://npm.io/package/globby.md) ^6.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [is-glob](https://npm.io/package/is-glob.md) ^4.0.0
- [resolve](https://npm.io/package/resolve.md) ^1.1.7
- [object-assign](https://npm.io/package/object-assign.md) ^4.0.1
- [postcss-import](https://npm.io/package/postcss-import.md) ^14.0.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2022-02-25
- 3.0.0 — 2017-09-11
- 2.1.0 — 2017-06-05
- 2.0.0 — 2017-01-12
- 1.0.1 — 2016-01-30
- 1.0.0 — 2016-01-29

## README

# postcss-easy-import [![Build Status][ci-img]][ci]

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

[postcss-import]: https://github.com/postcss/postcss-import
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/TrySound/postcss-easy-import.svg
[ci]: https://travis-ci.org/TrySound/postcss-easy-import

## Usage

```js
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:

```css
@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 */
```

## Options

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

### `prefix`

Type: `false` or `string`
Default: `false`

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

```css
@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']`.

### `extensions`

Type: `array` or `string`
Default: `.css`

Defines file extensions which will be looked for.

# License

MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)

---
_Source: https://npm.io/package/postcss-easy-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
