Package Exports
- @nuxt/postcss8
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nuxt/postcss8) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
postcss8 support for nuxt 2.15+
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:
- 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
autoprefixerinstead ofpostcss-preset-env
Usage
Install @nuxt/postcss8 as devDependency:
yarn add --dev @nuxt/postcss8
# or
npm i -D @nuxt/postcss8Add @nuxt/postcss8 to buildModules in nuxt.config:
// 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:
yarn add postcss@8 @nuxt/postcss8
# or
npm i postcss@8 @nuxt/postcss8Inside module:
export default async function() {
await this.addModule(require('@nuxt/postcss8'))
}