Files
bim_engine/vite.config.ts
yuding 191c571f40 refactor: sync managers and section box actions
Wire section box scale/reverse/reset to clipping APIs and sync demo artifacts.
2026-02-04 18:20:30 +08:00

46 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import { resolve } from 'path';
import cssInjectedByJs from 'vite-plugin-css-injected-by-js';
export default defineConfig(() => {
return {
plugins: [
// 移除 Vue 插件
dts({
include: ['src'],
exclude: [
'src/**/*.es.js',
'**/*.es.js'
],
rollupTypes: false,
logLevel: 'warn', // 只显示警告和错误
}),
cssInjectedByJs()
],
// 开发服务器配置
server: {
port: 3000,
host: '0.0.0.0',
open: '/demo/index.html',
allowedHosts: true,
},
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'IflowEngine',
fileName: (format) => `iflow-engine.${format}.js`,
},
rollupOptions: {
output: {
globals: {},
// 禁用代码分割,将所有代码打包到一个文件
inlineDynamicImports: true,
},
},
sourcemap: true,
emptyOutDir: true,
},
};
});