2022-03-21 게시 됨2022-05-15 업데이트 됨react몇 초안에 읽기 (약 62 단어)vite react-ts에서 emotion css prop 쓰기 vite.config.ts1234567891011121314import { defineConfig } from 'vite';import react from '@vitejs/plugin-react';// https://vitejs.dev/config/export default defineConfig({ plugins: [ react({ jsxImportSource: '@emotion/react', babel: { plugins: ['@emotion/babel-plugin'], }, }), ],}); tsconfig.json123456{ "compilerOptions": { // ... "jsxImportSource": "@emotion/react" }} 참고 https://dev.to/glocore/configure-emotion-with-your-vite-react-project-7jl
2021-11-27 게시 됨2022-02-12 업데이트 됨react몇 초안에 읽기 (약 81 단어)emotion css prop terminal12yarn add @emotion/css @emotion/react @emotion/babel-preset-css-propyarn add -D react-app-rewired customize-cra tsconfig.json123456{ "compilerOptions": { // ... "jsxImportSource": "@emotion/react" }} jsx 엘리먼트에서 css 속성을 사용할 수 있다 참고 https://emotion.sh/docs/typescript#css-prop https://emotion.sh/docs/@emotion/babel-preset-css-prop#install https://github.com/chinsun9/react-ts-template/tree/cra5.css-prop