Reputation: 11
I'm using the assembly with vite. I want to create a direct mega assembly, but I have such a problem. I don't understand how to use autoperixer with jsx.
I really don't know how to connect it. I have included an autoprefixer but it only works on css/scss files using this way: How to add autoprefixer with vite + react project . Pts re-read a lot and how to connect autoprefixer with CSS-in-JS and everywhere in different ways. Then use postcss-js (on the npm site) or use autograf in github, but I still don’t understand how to set them up for styled components (and it’s desirable not to include import every time). Please explain how to set it up and preferably in as much detail as possible.
package.json:
"devDependencies": {
"astroturf": "^1.1.0",
"autoprefixer": "^10.4.13",
"postcss-js": "^4.0.1",
}
.postcssrc.cjs:
module.exports = {
plugins: {
autoprefixer: {},
},
};
Upvotes: 0
Views: 943
Reputation: 11
Style components automatically adds vendor prefix. But because of the latest version of style components, it didn't add it at all, but it worked. The version in which no prefixes were added: @5.3.8 The version because of which nothing works at all: @5.3.7 На которой вроде что-то работает: @3.5.5 - @3.5.6
Upvotes: 1