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';
|
2021-11-21 14:38:01 +08:00
|
|
|
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({
|
2021-10-31 16:33:56 +08:00
|
|
|
base: './',
|
2021-09-23 18:21:20 +08:00
|
|
|
plugins: [
|
2021-12-16 15:16:27 +08:00
|
|
|
react(),
|
2021-11-06 13:43:17 +08:00
|
|
|
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
|
|
|
});
|