# postcss-import

> PostCSS plugin that inlines @import rules

Source: https://talira.ai/catalog/postcss-import-cd73wf05
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [frontend / css / transformers](https://talira.ai/categories/frontend/css/transformers), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^1]
- Backed by: [PostCSS](https://talira.ai/orgs/postcss-org.md)

postcss-import is a [PostCSS](https://talira.ai/catalog/postcss-hhcseckv.md) plugin that replaces CSS @import rules with the content of the imported files, so later plugins see one stylesheet. It resolves imports from local files, node_modules (using a package's style or main field, or its index.css) and web_modules, or from paths you give it, imports each file once per scope, and follows the CSS @import rules on ordering. Run it first in your PostCSS plugin list. Install it from npm as postcss-import.

## Links

- GitHub: https://github.com/postcss/postcss-import

## Problems it solves

- bundle my CSS @import files into one stylesheet at build time
- import a CSS file from an npm package in my stylesheet
- stop the browser making extra requests for each CSS @import

## Features

- inlines @import rules
- resolves imports from node_modules, web_modules and local files
- imports each file once per scope (skipDuplicates option)
- custom lookup paths and a filter option

## Trust

Overall: 0.49 out of 1.
Signals: maintenance 0.63, adoption 0.63, momentum 0.31, community 0.65, backing 0.30, extensibility 0.00.

- last commit 13 days ago
- 5 commits in the last 90 days
- latest release 14.0.0 6.0 years ago
- 1.4k GitHub stars
- 40 contributors
- backed by PostCSS

## Related

- Works with [PostCSS](https://talira.ai/catalog/postcss-hhcseckv.md)

## Alternatives

- [Lightning CSS](https://talira.ai/catalog/lightning-css-n8fjay3q.md): An extremely fast CSS parser, transformer, bundler, and minifier
- [Autoprefixer](https://talira.ai/catalog/autoprefixer-mvrtfwmc.md): Adds CSS vendor prefixes using Can I Use data
- [PostCSS](https://talira.ai/catalog/postcss-hhcseckv.md): A tool for transforming CSS with JavaScript
- [cssnano](https://talira.ai/catalog/cssnano-wgaq2774.md): A modular CSS minifier built on PostCSS

## Sources

[^1]: https://github.com/postcss/postcss-import/blob/master/LICENSE (checked 29 Nov 2026)
