fix: 修复TypeScript配置错误并更新项目文档
详细说明: - 修复了@n8n/config包的TypeScript配置错误 - 移除了不存在的jest-expect-message类型引用 - 清理了所有TypeScript构建缓存 - 更新了可行性分析文档,添加了技术实施方案 - 更新了Agent prompt文档 - 添加了会展策划工作流文档 - 包含了n8n-chinese-translation子项目 - 添加了exhibition-demo展示系统框架
This commit is contained in:
77
n8n-n8n-1.109.2/packages/frontend/@n8n/design-system/vite.config 2.mts
Executable file
77
n8n-n8n-1.109.2/packages/frontend/@n8n/design-system/vite.config 2.mts
Executable file
@@ -0,0 +1,77 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
import components from 'unplugin-vue-components/vite';
|
||||
import icons from 'unplugin-icons/vite';
|
||||
import iconsResolver from 'unplugin-icons/resolver';
|
||||
import { vitestConfig } from '@n8n/vitest-config/frontend';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
|
||||
const packagesDir = resolve(__dirname, '..', '..', '..');
|
||||
|
||||
export default mergeConfig(
|
||||
defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
svgLoader({
|
||||
svgoConfig: {
|
||||
plugins: [
|
||||
{
|
||||
name: 'preset-default',
|
||||
params: {
|
||||
overrides: {
|
||||
// disable a default plugin
|
||||
cleanupIds: false,
|
||||
// preserve viewBox for scalability
|
||||
removeViewBox: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
icons({
|
||||
compiler: 'vue3',
|
||||
autoInstall: true,
|
||||
}),
|
||||
components({
|
||||
dirs: [],
|
||||
dts: false,
|
||||
resolvers: [
|
||||
iconsResolver({
|
||||
prefix: 'Icon',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
'@n8n/design-system': resolve(__dirname, 'src'),
|
||||
'@n8n/composables(.*)': resolve(packagesDir, 'frontend', '@n8n', 'composables', 'src$1'),
|
||||
'@n8n/utils(.*)': resolve(packagesDir, '@n8n', 'utils', 'src$1'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src', 'index.ts'),
|
||||
name: 'N8nDesignSystem',
|
||||
fileName: (format) => `n8n-design-system.${format}.js`,
|
||||
},
|
||||
rollupOptions: {
|
||||
// make sure to externalize deps that shouldn't be bundled
|
||||
// into your library
|
||||
external: ['vue'],
|
||||
output: {
|
||||
exports: 'named',
|
||||
// Provide global variables to use in the UMD build
|
||||
// for externalized deps
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
vitestConfig,
|
||||
);
|
||||
Reference in New Issue
Block a user