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)).
$ cnpm install nuxt-postcss8
Since nuxt@2.15 nuxt supports opting-in to use postcss@8 (via nuxt/nuxt.js#8546).
Upgrade is pending for csstools/postcss-preset-env#191 (see nuxt/nuxt.js#8087 and nuxt/nuxt.js#8408)
In the meantime, this module allows rapid migration:
>= 2.15.3)__NUXT_PREPATHS__autoprefixer instead of postcss-preset-envInstall nuxt-postcss8 as devDependency:
yarn add --dev nuxt-postcss8
# or
npm i -D nuxt-postcss8
Add nuxt-postcss8 to buildModules in nuxt.config:
// nuxt.config
export default {
buildModules: [
'nuxt-postcss8'
]
}
If you have a nuxt module that requires postcss@8, install postcss@8 and nuxt-postcss8 as dependency:
yarn add postcss@8 nuxt-postcss8
# or
npm i postcss@8 nuxt-postcss8
Inside module:
export default async function() {
await this.addModule(require('nuxt-postcss8'))
}
Copyright 2013 - present © cnpmjs.org | Home |