#CRA to Vite migration affects styling

1 messages · Page 1 of 1 (latest)

minor maple
#

Hello I wanted to migrate my Create-React-App to Vite which already worked greatly. But I saw that certain styles like some margins, font-sizes and paddings look way different on my CRA next to my Vite app. For styling I use custom Sass which is imported correctly as the style in general is there it just isn't 1:1 like before. Do i need to rework all my styles now for Vite and why is it happening?

patent anvil
#

You might need to include autoprefixer in a postcss.config.js file which CRA includes

import autoprefixer from 'autoprefixer';

export default {
  plugins: [autoprefixer],
};
#

You will have to install autoprefixer and postcss as dependencies