fix(client): Downgrade to Vite v3 (#9313)

* Revert "refactor(client): Create root.vue and select the ui in it (#9312)"

This reverts commit 0294555e2b.

* use vite v3

* Revert "Revert "refactor(client): Create root.vue and select the ui in it (#9312)""

This reverts commit 56910e27fbad352f3cb8324a167aaf1446cea7c2.

* Revert "refactor(client): Create root.vue and select the ui in it (#9312)"

This reverts commit 0294555e2b.

* use vite@3.2.4

* update to v3.2.5
This commit is contained in:
tamaina 2022-12-14 13:35:18 +09:00 committed by GitHub
parent 4b98920f02
commit f4f293d5f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 251 additions and 240 deletions

View file

@ -13,7 +13,7 @@
"@rollup/plugin-json": "5.0.2",
"@rollup/pluginutils": "5.0.2",
"@syuilo/aiscript": "0.11.1",
"@vitejs/plugin-vue": "4.0.0",
"@vitejs/plugin-vue": "3",
"@vue/compiler-sfc": "3.2.45",
"autobind-decorator": "2.4.0",
"autosize": "5.0.2",
@ -57,7 +57,6 @@
"typescript": "4.9.4",
"uuid": "9.0.0",
"vanilla-tilt": "1.7.3",
"vite": "4.0.0",
"vue": "3.2.45",
"vue-prism-editor": "2.0.0-alpha.2",
"vuedraggable": "4.0.1"
@ -85,6 +84,7 @@
"eslint-plugin-vue": "9.8.0",
"rollup": "3.7.2",
"start-server-and-test": "1.15.2",
"vite": "3.2.5",
"vue-eslint-parser": "^9.1.0"
}
}

View file

@ -38,7 +38,6 @@ import { reloadChannel } from '@/scripts/unison-reload';
import { reactionPicker } from '@/scripts/reaction-picker';
import { getUrlWithoutLoginId } from '@/scripts/login-id';
import { getAccountFromId } from '@/scripts/get-account-from-id';
import rootComponent from '@/root.vue';
(async () => {
console.info(`Misskey v${version}`);
@ -159,7 +158,13 @@ import rootComponent from '@/root.vue';
initializeSw();
});
const app = createApp(rootComponent);
const app = createApp(
window.location.search === '?zen' ? defineAsyncComponent(() => import('@/ui/zen.vue')) :
!$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) :
ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) :
ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) :
defineAsyncComponent(() => import('@/ui/universal.vue')),
);
if (_DEV_) {
app.config.performance = true;

View file

@ -1,19 +0,0 @@
<template>
<ZenUi v-if="searchString === '?zen'" />
<VisitorUi v-else-if="!$i" />
<DeckUi v-else-if="ui === 'deck'" />
<ClassicUi v-else-if="ui === 'classic'" />
<UniversalUi v-else />
</template>
<script lang="ts" setup>
import ZenUi from '@/ui/zen.vue';
import VisitorUi from '@/ui/visitor.vue';
import DeckUi from '@/ui/deck.vue';
import ClassicUi from '@/ui/classic.vue';
import UniversalUi from '@/ui/universal.vue';
import { $i } from '@/account';
import { ui } from '@/config';
const searchString = window.location.search;
</script>