1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| import path, { resolve } from 'node:path';
|
| import { univerPlugin } from '@univerjs/vite-plugin';
| import vue from '@vitejs/plugin-vue';
| import { defineConfig } from 'vite';
|
| // https://vite.dev/config/
| export default defineConfig({
| build: {
| lib: {
| entry: path.resolve(__dirname, 'src/components/Report/index.ts'),
| fileName: `index`,
| name: 'index',
| },
| rollupOptions: {
| external: ['vue', 'pinia'],
| output: {
| exports: 'named',
| globals: {
| pinia: 'Pinia',
| vue: 'Vue',
| },
| },
| },
| },
| plugins: [
| vue(),
| univerPlugin({
| css: false,
| }),
| ],
| resolve: {
| alias: {
| '@': resolve('src'),
| },
| },
| server: {
| host: '0.0.0.0',
| },
| });
|
|