From cca272359621328a3a2ff06dc9301d667a213706 Mon Sep 17 00:00:00 2001 From: bongtta Date: Wed, 20 Nov 2024 19:28:53 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20JSX=20pragma=20=EC=A0=84=EC=97=AD=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.app.json | 1 + tsconfig.json | 6 +++++- vite.config.ts | 18 ++++++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/tsconfig.app.json b/tsconfig.app.json index 8183492..aeb18cf 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -6,6 +6,7 @@ "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, + "jsxImportSource": "@emotion/react", /* Bundler mode */ "moduleResolution": "Bundler", diff --git a/tsconfig.json b/tsconfig.json index 1ffef60..44e725f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,5 +3,9 @@ "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } - ] + ], + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "@emotion/react" + } } diff --git a/vite.config.ts b/vite.config.ts index 6d42043..4a7c269 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,12 +1,18 @@ -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react-swc"; -import tsconfigPaths from "vite-tsconfig-paths"; -import svgr from "vite-plugin-svgr"; +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react-swc'; +import tsconfigPaths from 'vite-tsconfig-paths'; +import svgr from 'vite-plugin-svgr'; // https://vite.dev/config/ export default defineConfig({ - plugins: [react(), tsconfigPaths(), svgr()], + plugins: [ + react({ + jsxImportSource: '@emotion/react', + }), + tsconfigPaths(), + svgr(), + ], resolve: { - extensions: [".js", ".jsx", ".ts", ".tsx"], + extensions: ['.js', '.jsx', '.ts', '.tsx'], }, });