Skip to content

Commit

Permalink
chore: add postcss-nested instead of preset
Browse files Browse the repository at this point in the history
Waiting for csstools/postcss-preset-env#191 to be ready
  • Loading branch information
atinux committed Mar 8, 2021
1 parent d532723 commit bb9904a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ module.exports = async function (moduleOptions) {
** Set PostCSS config
*/
const { postcss } = nuxt.options.build

postcss.preset.stage = 1 // see https://tailwindcss.com/docs/using-with-preprocessors#future-css-features
postcss.plugins = postcss.plugins || {}

// No working at the moment: https://github.com/csstools/postcss-preset-env/issues/191
// postcss.preset.stage = 1 // see https://tailwindcss.com/docs/using-with-preprocessors#future-css-features
// Let's use postcss-nested
postcss.plugins['postcss-nested'] = postcss.plugins['postcss-nested'] || {}

// Let modules extend the tailwind config
await nuxt.callHook('tailwindcss:config', tailwindConfig)

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"fs-extra": "^9.1.0",
"nuxt-postcss8": "^1.0.1",
"postcss": "^8.2.7",
"postcss-nested": "^5.0.5",
"tailwind-config-viewer": "^1.5.0",
"tailwindcss": "^2.0.3",
"ufo": "^0.6.9"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9070,7 +9070,7 @@ postcss-modules-values@^4.0.0:
dependencies:
icss-utils "^5.0.0"

postcss-nested@^5.0.1:
postcss-nested@^5.0.1, postcss-nested@^5.0.5:
version "5.0.5"
resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.5.tgz#f0a107d33a9fab11d7637205f5321e27223e3603"
integrity sha512-GSRXYz5bccobpTzLQZXOnSOfKl6TwVr5CyAQJUPub4nuRJSOECK5AqurxVgmtxP48p0Kc/ndY/YyS1yqldX0Ew==
Expand Down

0 comments on commit bb9904a

Please sign in to comment.