Vite + Styled Components Example
More of a request but is there any chance we can get an ideal example for using Styled Components with Vite? I tried my hand at it but would love to see something here to go off of.
Update on this, might have a working example that follows some previous code ya'll added! Going to try and contribute an example for this when I get some time
this one works for me import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite';
// https://vitejs.dev/config/ export default defineConfig({ plugins: [ react({ include: /.(jsx|tsx)$/, babel: { plugins: ['styled-components'], babelrc: false, configFile: false, }, }), ], });
@seanmcquaid hey, have you figured out how to make Remix + Vite work with styled-components?
I did! Here are the links to the entry.server.tsx + root.tsx files, it was really just following what was already in place.
https://github.com/seanmcquaid/remix-unstable-vite-playground/blob/main/app/entry.server.tsx#L38-L55
https://github.com/seanmcquaid/remix-unstable-vite-playground/blob/main/app/root.tsx#L37
This solution worked for me: https://github.com/styled-components/styled-components/issues/4275