Tree-shake Vuestic and chunking performance
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
|
||||
import App from './App.vue';
|
||||
import router from './router';
|
||||
import { createVuestic } from 'vuestic-ui';
|
||||
import { createVuesticEssential } from 'vuestic-ui';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
const app = createApp(App);
|
||||
@@ -15,5 +15,5 @@ app
|
||||
.use(i18n)
|
||||
.use(createPinia().use(piniaPluginPersistedstate))
|
||||
.use(router)
|
||||
.use(createVuestic())
|
||||
.use(createVuesticEssential())
|
||||
.mount('#app');
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import _amenities from './data/amenities.json';
|
||||
|
||||
export type OSMAmenity = {
|
||||
value: string;
|
||||
in_wiki: boolean;
|
||||
@@ -8,7 +6,6 @@ export type OSMAmenity = {
|
||||
de?: string;
|
||||
};
|
||||
};
|
||||
export const amenities: OSMAmenity[] = _amenities;
|
||||
|
||||
export interface APIElement {
|
||||
id: string;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { amenities } from '@/osm';
|
||||
import amenities from '@/data/amenities.json';
|
||||
import { useMapStore } from '@/stores/map';
|
||||
import { useThemeStore } from '@/stores/theme';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { OSMAmenity } from '@/osm';
|
||||
|
||||
const theme = useThemeStore();
|
||||
const mapStore = useMapStore();
|
||||
@@ -40,7 +41,7 @@ const i18n = useI18n();
|
||||
>
|
||||
<VaVirtualScroller
|
||||
v-slot="{ item }"
|
||||
:items="amenities"
|
||||
:items="amenities as OSMAmenity[]"
|
||||
wrapper-size="30rem"
|
||||
>
|
||||
<VaCheckbox
|
||||
|
||||
Reference in New Issue
Block a user