fix: 修复管理端前端 lint 与构建问题

- 收敛 easyflow-ui-admin 的 lint、格式和类型问题

- 修正 demo 页面与管理端前端构建失败点

- 验证 pnpm lint 与 pnpm build 均已通过
This commit is contained in:
2026-04-05 21:39:13 +08:00
parent bb72e19c84
commit 7e7c236c2a
240 changed files with 5151 additions and 4701 deletions

View File

@@ -1,44 +1,44 @@
import {defineConfig} from 'vite';
import {resolve} from 'path';
import {svelte} from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';
import { resolve } from 'path';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import dts from 'vite-plugin-dts';
import replace from '@rollup/plugin-replace';
// https://vitejs.dev/config/
export default defineConfig({
build: {
outDir: 'dist',
emptyOutDir: true,
minify: true,
sourcemap: true,
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:{
output: {
// 确保所有依赖都被打包
inlineDynamicImports: true,
exports: 'named',
},
plugins: [
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('production') // 替换为生产环境
})
]
}
build: {
outDir: 'dist',
emptyOutDir: true,
minify: true,
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/index.ts'),
cssFileName: 'index',
fileName: (format) => {
return format === 'umd' ? 'index.umd.js' : 'index.js';
},
formats: ['es', 'umd'],
name: 'Tinyflow',
},
plugins: [
svelte({ emitCss: false }),
dts({
rollupTypes: true,
tsconfigPath: './tsconfig.app.json'
})
]
rollupOptions: {
output: {
// 确保所有依赖都被打包
inlineDynamicImports: true,
exports: 'named',
},
plugins: [
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('production'), // 替换为生产环境
}),
],
},
},
plugins: [
svelte({ emitCss: false }),
dts({
rollupTypes: true,
tsconfigPath: './tsconfig.app.json',
}),
],
});