sunmao-ui/packages/runtime/vite.config.ts
2021-09-13 10:09:17 +08:00

17 lines
465 B
TypeScript

import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactRefresh()],
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'`,
},
});