Closed romatou closed 1 year ago
How is the postcss.config.cjs
configed
How is the
postcss.config.cjs
configed
module.exports = {
plugins: {
tailwindcss: { config: './tailwind.config.cjs' },
autoprefixer: {},
},
}
I partially found how to fix this in vite.config.ts
but I don't understand the type that needs to be followed.
export default defineConfig({
...
css: {
postcss: {
plugins: [tailwindcss, autoprefixer],
},
...
})
I have added a string with postcss.config.cjs
, the error disappeared, but Tailwind is not rendered. Now I just need to pass the plugin correctly.
Could you provide an reproduction on https://vite.new
Could you provide an reproduction on https://vite.new
Do you have a boilerplate with a monorepo (client + server)? If no, I'd have to make one and send a Github repository link.
Or if you could help me provide correct plugin option into vite.config.ts
, I think that would fix the problem.
export default defineConfig({
...
css: {
postcss: {
plugins: [?]
},
...
})
Describe the bug
I have an app with client and server folders.
tailwind.config.cjs
,postcss.config.cjs
andvite.config.ts
are located inpackages/client
directory, so doesindex.css
that is imported inApp.tsx
. A Vite createServer is created inpackages/server/index.ts
in middleware mode (SSR) from vitejs.dev guide.The problem
Vite
createServer
App.tsx
Reproduction
-
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Logs
No response
Validations