-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tailwind/nesting not recognized as a postcss plugin(can astro read the postcss.config.js file?) #6202
Comments
Have you tried what is suggested in the error console? The link from tailwind doc pointed that, for nesting CSS selectors, they encourage to use one of their modules: $ npm i npm i @tailwindcss/nesting And to add it to the plugin section of postcss: module.exports = {
plugins: {
"postcss-import": {},
"tailwindcss/nesting": {},
tailwindcss: {},
autoprefixer: {},
},
}; |
I think |
Hmm, I can still reproduce the error. https://stackblitz.com/edit/github-elgzfe-wtdjpf?file=postcss.config.js For me, even after explicitly adding the tailwind nesting dependency(the |
Renaming file extension to |
Ah because the project has |
Good call! I was just going to test that possibility |
Feel free to reopen if you still encounter the issue @Lilja |
Thank you fellas! |
Just hit this warning also, but it seems that it's not just astro users experiencing this tailwindlabs/tailwindcss#7035. As an not-so-nice alternative you can also add the plugins via the astro config |
I did everything exactly as described in the documentation https://tailwindcss.com/docs/using-with-preprocessors#nesting // package.json
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.1.0",
"autoprefixer": "^10.4.14",
"laravel-vite-plugin": "^0.7.4",
"postcss": "^8.4.21",
"postcss-nesting": "^11.2.2",
"tailwindcss": "^3.3.1",
"vite": "^4.2.1"
},
"dependencies": {
"shepherd.js": "^11.1.1",
"vue": "^3.2.47"
}
}
// postcss.config.js
module.exports = {
plugins: {
'tailwindcss/nesting': 'postcss-nesting',
tailwindcss: {},
autoprefixer: {}
}
}
// vite.config.js
import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [
vue(),
laravel({
refresh: true,
input: ['resources/css/app.css', 'resources/js/app.js']
})
]
}) After run command |
What version of
astro
are you using?^2.0.4
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Windows/WSL
Describe the Bug
Click to view astro component
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-elgzfe?file=postcss.config.js
Participation
The text was updated successfully, but these errors were encountered: