vercel / styled-jsx

Full CSS support for JSX without compromises
http://npmjs.com/styled-jsx
MIT License
7.65k stars 266 forks source link

Support for vite + swc #834

Closed liliwei25 closed 1 year ago

liliwei25 commented 1 year ago

Do you want to request a feature or report a bug? Feature

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar

i tried to setup my vite config like below but i am getting an error

import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react({ plugins: [["@swc/plugin-styled-jsx", {}]]})],
  server: {
    port: 3000,
  },
})
Screenshot 2023-05-29 at 1 03 01 AM

What is the expected behavior? the@swc/plugin-styled-jsx should work with the @vitejs/plugin-react-swc plugin

Environment (include versions)

Did this work in previous versions? Not sure

huozhi commented 1 year ago

Close as this is the issue to https://github.com/swc-project/plugins where the swc plugin is maintained