fix: When refreshing the page, the topic is wrong

This commit is contained in:
vben
2024-05-25 22:43:22 +08:00
parent 352119cc3a
commit f2644dbbc5
11 changed files with 38 additions and 24 deletions

View File

@@ -86,6 +86,7 @@ async function getApplicationConditionPlugins(
): Promise<PluginOption[]> {
// 单独取否则commonOptions拿不到
const isBuild = options.isBuild;
const env = options.env;
const {
compress,
@@ -123,7 +124,7 @@ async function getApplicationConditionPlugins(
},
{
condition: injectAppLoading,
plugins: async () => [await viteInjectAppLoadingPlugin()],
plugins: async () => [await viteInjectAppLoadingPlugin(isBuild, env)],
},
{
condition: isBuild && !!compress,