vite react-ts에서 emotion css prop 쓰기

vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { 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.json
1
2
3
4
5
6
{
"compilerOptions": {
// ...
"jsxImportSource": "@emotion/react"
}
}

참고

Author

chinsung

Posted on

2022-03-21

Updated on

2022-05-15

Licensed under

댓글