emotion
install
react
npm install @emotion/react
vite
npm install @vitejs/plugin-react @emotion/babel-plugin
// vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react({
jsxImportSource: '@emotion/react'
babel: {
plugins: ["@emotion/babel-plugin"]
}
})]
})
// tsconfig.json
{
"compilerOptions": {
"jsxImportSource": "@emotion/react"
}
}