| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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',
- },
- });
|