fix: 修复版本号导入 Vite serving allow list 错误
This commit is contained in:
3
web/src/lib/version.ts
Normal file
3
web/src/lib/version.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// 版本号配置
|
||||
// 更新版本时需要手动修改此文件
|
||||
export const VERSION = '1.3.0';
|
||||
@@ -27,8 +27,8 @@
|
||||
import Sparkles from '@lucide/svelte/icons/sparkles';
|
||||
import Info from '@lucide/svelte/icons/info';
|
||||
|
||||
// 从 package.json 导入版本号
|
||||
import pkg from '../../package.json';
|
||||
// 版本号
|
||||
import { VERSION } from '$lib/version';
|
||||
|
||||
// Theme
|
||||
import {
|
||||
@@ -248,7 +248,7 @@
|
||||
title="查看更新日志"
|
||||
>
|
||||
<Info class="size-4" />
|
||||
<span class="text-xs">v{pkg.version}</span>
|
||||
<span class="text-xs">v{VERSION}</span>
|
||||
</button>
|
||||
{/snippet}
|
||||
</Sidebar.MenuButton>
|
||||
|
||||
Reference in New Issue
Block a user