Reputation: 11
guys!
How to customize vite.config.ts to make vite.config.ts postcss-lit work?
My postcss syntax is not working for me. Specifically &
For example, &-container {//rules} will not work.
vite.config.ts
import { defineConfig } from "vite";
import postcss from "rollup-plugin-postcss";
export default defineConfig({
plugins: [
postcss({
syntax: "postcss-lit",
}),
],
});
package.json
{
"name": "1",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"lit": "^3.2.1"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"postcss-lit": "^1.2.0",
"rollup-plugin-postcss": "^4.0.2",
"typescript": "~5.7.3",
"vite": "^6.0.11"
},
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
}
Upvotes: 0
Views: 40