diff --git a/src/renderer/src/components/Playground/Output/Transform/index.tsx b/src/renderer/src/components/Playground/Output/Transform/index.tsx index 849a44a..d135018 100644 --- a/src/renderer/src/components/Playground/Output/Transform/index.tsx +++ b/src/renderer/src/components/Playground/Output/Transform/index.tsx @@ -2,7 +2,7 @@ import MonacoEditor from '@monaco-editor/react' import { Loader } from 'esbuild-wasm' import '@/components/Playground/Output/Transform/transform.scss' import { IFile, ITheme } from '@/components/Playground/shared' -import { cssToJs, jsonToJs, addReactImport } from '@/components/Playground/files' +import { cssToJs, jsonToJs } from '@/components/Playground/files' import Compiler from '@/components/Playground/compiler' import { MonacoEditorConfig } from '@/components/Playground/CodeEditor/Editor/monacoConfig' @@ -16,12 +16,7 @@ const Transform = ({ file, theme }: OutputProps) => { const [errorMsg, setErrorMsg] = useState('') const compile = (code: string, loader: Loader) => { - let _code = code - if (['jsx', 'tsx'].includes(loader)) { - _code = addReactImport(code) - } - - Compiler?.transform(_code, loader) + Compiler?.transform(code, loader) .then((value) => { setCompiledCode(value.code) setErrorMsg('')