mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2025-02-23 17:49:49 +08:00
29 lines
685 B
TypeScript
29 lines
685 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { virtualExamplePlugin } from '@sunmao-ui/vite-plugins';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: [
|
|
[
|
|
'@babel/plugin-transform-react-jsx',
|
|
{
|
|
throwIfNamespace: false, // defaults to true
|
|
runtime: 'automatic',
|
|
importSource: '@emotion/react',
|
|
},
|
|
],
|
|
],
|
|
},
|
|
}),
|
|
virtualExamplePlugin(),
|
|
],
|
|
define: {
|
|
// https://github.com/satya164/react-simple-code-editor/issues/86
|
|
global: 'globalThis',
|
|
},
|
|
});
|