feat: Feature/pro docs (#70)
* chore: merge main * feat: update docs * feat: remove coze-assistant * feat: add watermark plugin * feat: update preferences * feat: update docs --------- Co-authored-by: vince <vince292007@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { fs } from '@vben/node-utils';
|
||||
import { fs, readPackageJSON } from '@vben/node-utils';
|
||||
|
||||
import { type PluginOption } from 'vite';
|
||||
|
||||
@@ -15,8 +15,9 @@ async function viteInjectAppLoadingPlugin(
|
||||
loadingTemplate = 'loading.html',
|
||||
): Promise<PluginOption | undefined> {
|
||||
const loadingHtml = await getLoadingRawByHtmlTemplate(loadingTemplate);
|
||||
const { version } = await readPackageJSON(process.cwd());
|
||||
const envRaw = isBuild ? 'prod' : 'dev';
|
||||
const cacheName = `'${env.VITE_APP_NAMESPACE}-${envRaw}-preferences-theme'`;
|
||||
const cacheName = `'${env.VITE_APP_NAMESPACE}-${version}-${envRaw}-preferences-theme'`;
|
||||
|
||||
// 获取缓存的主题
|
||||
// 保证黑暗主题下,刷新页面时,loading也是黑暗主题
|
||||
|
@@ -74,6 +74,7 @@ async function viteMetadataPlugin(
|
||||
license,
|
||||
version,
|
||||
}),
|
||||
'import.meta.env.VITE_APP_VERSION': JSON.stringify(version),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@@ -30,7 +30,7 @@ async function viteLicensePlugin(
|
||||
handler: (_options: NormalizedOutputOptions, bundle: OutputBundle) => {
|
||||
const date = dateUtil().format('YYYY-MM-DD ');
|
||||
const copyrightText = `/*!
|
||||
* Vue Vben Admin
|
||||
* Vben Admin
|
||||
* Version: ${version}
|
||||
* Author: vben
|
||||
* Copyright (C) 2024 Vben
|
||||
|
Reference in New Issue
Block a user