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

26 lines
606 B
TypeScript
Raw Normal View History

2021-09-22 15:34:52 +08:00
import { defineConfig } from 'vite';
2021-09-23 18:21:20 +08:00
import react from '@vitejs/plugin-react';
import { virtualExamplePlugin } from '@sunmao-ui/vite-plugins';
2021-11-06 15:35:57 +08:00
import { resolve } from 'path';
2021-09-22 15:34:52 +08:00
// https://vitejs.dev/config/
export default defineConfig({
base: './',
2021-09-23 18:21:20 +08:00
plugins: [
2021-12-16 15:16:27 +08:00
react(),
virtualExamplePlugin(),
2021-09-23 18:21:20 +08:00
],
2021-09-22 15:34:52 +08:00
define: {
// https://github.com/satya164/react-simple-code-editor/issues/86
global: 'globalThis',
},
2021-11-06 15:35:57 +08:00
build: {
rollupOptions: {
input: {
index: resolve(__dirname, './index.html'),
playground: resolve(__dirname, './playground.html'),
},
},
},
2021-09-22 15:34:52 +08:00
});