- 修复 Tinyflow Vue wrapper 可选 boolean 默认关闭节点拖拽和连线的问题 - 为 Tinyflow 增加 structuredClone 兼容与 Chrome 90 构建目标 - 增加节点交互归一化与 Tab 空值防御
41 lines
882 B
TypeScript
41 lines
882 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'path';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import dts from 'vite-plugin-dts';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
minify: true,
|
|
sourcemap: true,
|
|
cssCodeSplit: true,
|
|
target: 'chrome90',
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
cssFileName: 'index',
|
|
fileName: (format) => {
|
|
return format === 'umd' ? 'index.umd.js' : 'index.js';
|
|
},
|
|
formats: ['es', 'umd'],
|
|
name: 'Tinyflow',
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue'], // 排除 Vue 作为外部依赖
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
dts({
|
|
rollupTypes: true,
|
|
tsconfigPath: './tsconfig.app.json',
|
|
}),
|
|
],
|
|
});
|