sunmao-ui/packages/editor/vite.config.ts
2021-12-20 11:33:54 +08:00

26 lines
606 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: [
react(),
virtualExamplePlugin(),
],
define: {
// https://github.com/satya164/react-simple-code-editor/issues/86
global: 'globalThis',
},
build: {
rollupOptions: {
input: {
index: resolve(__dirname, './index.html'),
playground: resolve(__dirname, './playground.html'),
},
},
},
});