# @nuxt/postcss8

> Since [nuxt@2.15](https://github.com/nuxt/nuxt.js/releases/tag/v2.15.0) nuxt supports opting-in to use `postcss@8` (via [nuxt/nuxt.js#8546](https://github.com/nuxt/nuxt.js/pull/8546)).

Latest version **1.1.3** (published 2021-03-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @nuxt/postcss8
pnpm add @nuxt/postcss8
yarn add @nuxt/postcss8
bun add @nuxt/postcss8
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2021-03-10 |
| First published | 2021-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 60 |
| Maintainers | atinux, pi0, clarkdo |

## Links

- npm: https://www.npmjs.com/package/@nuxt/postcss8
- Repository: https://github.com/nuxt/postcss8
- Homepage: https://github.com/nuxt/postcss8#readme
- Issues: https://github.com/nuxt/postcss8/issues
- npm.io page: https://npm.io/package/@nuxt/postcss8

## Dependencies (8)

- [defu](https://npm.io/package/defu.md) ^3.2.2
- [semver](https://npm.io/package/semver.md) ^7.3.4
- [postcss](https://npm.io/package/postcss.md) ^8.1.10
- [css-loader](https://npm.io/package/css-loader.md) ^5.0.0
- [postcss-url](https://npm.io/package/postcss-url.md) ^10.1.1
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^10.2.5
- [postcss-import](https://npm.io/package/postcss-import.md) ^13.0.0
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^4.1.0

## Recent versions

- 1.1.3 (latest) — 2021-03-10

## README

# postcss8 support for nuxt 2.15+

Since [nuxt@2.15](https://github.com/nuxt/nuxt.js/releases/tag/v2.15.0) nuxt supports opting-in to use `postcss@8` (via [nuxt/nuxt.js#8546](https://github.com/nuxt/nuxt.js/pull/8546)).

Upgrade is pending for [csstools/postcss-preset-env#191](https://github.com/csstools/postcss-preset-env/issues/191) (see [nuxt/nuxt.js#8087](https://github.com/nuxt/nuxt.js/issues/8087) and [nuxt/nuxt.js#8408](https://github.com/nuxt/nuxt.js/pull/8408))

In the meantime, this module allows rapid migration:

- Ensures supported nuxt version is used (`>= 2.15.3`)
- Forces to use upgraded dependencies using `__NUXT_PREPATHS__`
- Will be updated accordingly to self-disable when a nuxt version with default postcss8 detected
- Use `autoprefixer` instead of `postcss-preset-env`

## Usage

Install `@nuxt/postcss8` as `devDependency`:

```sh
yarn add --dev @nuxt/postcss8
# or
npm i -D @nuxt/postcss8
```

Add `@nuxt/postcss8` to `buildModules` in `nuxt.config`:

```js
// nuxt.config
export default {
  buildModules: [
    '@nuxt/postcss8'
  ]
}
```

### For module authors

If you have a nuxt module that requires postcss@8, install `postcss@8` and `@nuxt/postcss8` as `dependency`:

```sh
yarn add postcss@8 @nuxt/postcss8
# or
npm i postcss@8 @nuxt/postcss8
```

Inside module:
```js
export default async function() {
  await this.addModule(require('@nuxt/postcss8'))
}
```

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