sunmao-ui/packages/runtime/vite.config.ts

18 lines
531 B
TypeScript
Raw Normal View History

2021-09-06 14:03:29 +08:00
import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
2021-09-18 16:54:14 +08:00
import tsconfigPaths from 'vite-tsconfig-paths';
2021-07-02 18:23:20 +08:00
// https://vitejs.dev/config/
export default defineConfig({
2021-09-18 16:54:14 +08:00
plugins: [reactRefresh(), tsconfigPaths()],
2021-08-11 16:04:04 +08:00
define: {
// https://github.com/satya164/react-simple-code-editor/issues/86
2021-09-06 14:03:29 +08:00
global: 'globalThis',
},
esbuild: {
// https://dev.to/ajitsinghkamal/using-emotionjs-with-vite-2ndj
2021-09-15 14:08:37 +08:00
jsxFactory: 'jsx',
jsxInject: 'import { jsx } from "@emotion/react"',
2021-08-11 16:04:04 +08:00
},
2021-07-02 18:23:20 +08:00
});