# rollup-plugin-transform-postcss

> Transform any files with PostCSS

Latest version **1.0.5** (published 2018-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-transform-postcss
pnpm add rollup-plugin-transform-postcss
yarn add rollup-plugin-transform-postcss
bun add rollup-plugin-transform-postcss
```

## 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 | 1.0.5 |
| Published | 2018-01-09 |
| First published | 2018-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | aggre |
| Maintainers | aggre |
| Keywords | rollup-plugin, rollup, postcss |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-transform-postcss
- Repository: https://github.com/aggre/rollup-plugin-transform-postcss
- Homepage: https://github.com/aggre/rollup-plugin-transform-postcss#readme
- Issues: https://github.com/aggre/rollup-plugin-transform-postcss/issues
- npm.io page: https://npm.io/package/rollup-plugin-transform-postcss

## Dependencies (2)

- [postcss](https://npm.io/package/postcss.md) ^6.0.16
- [rollup-pluginutils](https://npm.io/package/rollup-pluginutils.md) ^2.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2018-01-09
- 1.0.3 — 2018-01-09
- 1.0.2 — 2018-01-08
- 1.0.1 — 2018-01-08
- 1.0.0 — 2018-01-08

## README

# rollup-plugin-transform-postcss

Transform any files with PostCSS

## Installation

```bash
npm install --save-dev rollup-plugin-transform-postcss
```

## Usage

```js
// input.js
export default () => {
	return `
	<style>
		body {
			display: flex;
		}
	</style>`
}
```

```js
// rollup.config.js
import postcss from 'rollup-plugin-transform-postcss';
import cssnext from 'postcss-cssnext'; // e.g. use cssnext

export default {
	input: 'input.js',
	output: {
		file: 'output.js',
		format: 'iife'
	},
	name: 'MyModule',
	plugins: [
		postcss({
			// Specify PostCSS plugin
			// e.g. use cssnext
			plguins: [cssnext], // Required

			include: ['**/*.js'], // Optional

			exclude: ['**/*.html'] // Optional
		})
	]
};
```

```js
// output.js
var MyModule = (function () {
'use strict';

var displayFlex = () => {
	return `
	<style>
		body {
			display: -webkit-box;
			display: -ms-flexbox;
			display: flex;
		}
	</style>`
}

return displayFlex;

}());
```

## License

MIT

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