sunmao-ui/packages/runtime/vite.config.ts
2021-09-18 18:06:31 +08:00

18 lines
531 B
TypeScript

import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import tsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactRefresh(), tsconfigPaths()],
define: {
// https://github.com/satya164/react-simple-code-editor/issues/86
global: 'globalThis',
},
esbuild: {
// https://dev.to/ajitsinghkamal/using-emotionjs-with-vite-2ndj
jsxFactory: 'jsx',
jsxInject: 'import { jsx } from "@emotion/react"',
},
});