mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2025-02-23 17:49:49 +08:00
31 lines
684 B
TypeScript
31 lines
684 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { virtualExamplePlugin } from '@sunmao-ui/vite-plugins';
|
|
import { resolve } from 'path';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [
|
|
virtualExamplePlugin(),
|
|
react({
|
|
jsxRuntime: 'classic',
|
|
}),
|
|
],
|
|
esbuild: {
|
|
logOverride: { 'this-is-undefined-in-esm': 'silent' },
|
|
},
|
|
define: {
|
|
// react-codemirror2 need this
|
|
global: 'globalThis',
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, './index.html'),
|
|
playground: resolve(__dirname, './playground.html'),
|
|
},
|
|
},
|
|
},
|
|
});
|