- Add SettingDialogManager with radio-style render mode picker (simple/balance/advanced) - Add getRenderMode/setRenderMode API to Engine and EngineManager layers - Wire setting toolbar button to toggle the settings dialog - Add i18n keys for settings dialog (zh-CN/en-US) - Add version display at bottom-right of engine wrapper - Bump version to 1.1.7, rebuild and sync demo libs
50 lines
1.2 KiB
TypeScript
50 lines
1.2 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';
|
|
import pkg from './package.json';
|
|
|
|
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,
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
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,
|
|
},
|
|
};
|
|
});
|