Skip to content

Commit

Permalink
feat: update vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-smartosc committed Jun 6, 2023
1 parent b291f64 commit 9e845ae
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 91 deletions.
3 changes: 1 addition & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
yarn format
npx --no -- commitlint --edit
162 changes: 77 additions & 85 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,85 @@
// Generated by unplugin-auto-import
export {}
declare global {
const ChargerInformation: typeof import("./components/common/vehicle-detail/ChargerInformation.vue")["default"];
const Container: typeof import("./components/base/Container.vue")["default"];
const EffectScope: typeof import("vue")["EffectScope"];
const Header: typeof import("./components/base/Header.vue")["default"];
const HistoryDetail: typeof import("./components/common/vehicle-detail/HistoryDetail.vue")["default"];
const Primary: typeof import("./components/common/my-button/Button.stories.js")["Primary"];
const Secondary: typeof import("./components/common/my-button/Button.stories.js")["Secondary"];
const Sidebar: typeof import("./components/base/Sidebar.vue")["default"];
const buttonStories: typeof import("./components/common/my-button/Button.stories.js")["default"];
const chargerInput: typeof import("./components/common/charger-input/index.vue")["default"];
const computed: typeof import("vue")["computed"];
const createApp: typeof import("vue")["createApp"];
const customRef: typeof import("vue")["customRef"];
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"];
const defineComponent: typeof import("vue")["defineComponent"];
const effectScope: typeof import("vue")["effectScope"];
const getCurrentInstance: typeof import("vue")["getCurrentInstance"];
const getCurrentScope: typeof import("vue")["getCurrentScope"];
const h: typeof import("vue")["h"];
const inject: typeof import("vue")["inject"];
const isProxy: typeof import("vue")["isProxy"];
const isReactive: typeof import("vue")["isReactive"];
const isReadonly: typeof import("vue")["isReadonly"];
const isRef: typeof import("vue")["isRef"];
const markRaw: typeof import("vue")["markRaw"];
const myButton: typeof import("./components/common/my-button/index.vue")["default"];
const nextTick: typeof import("vue")["nextTick"];
const onActivated: typeof import("vue")["onActivated"];
const onBeforeMount: typeof import("vue")["onBeforeMount"];
const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"];
const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"];
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"];
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"];
const onDeactivated: typeof import("vue")["onDeactivated"];
const onErrorCaptured: typeof import("vue")["onErrorCaptured"];
const onMounted: typeof import("vue")["onMounted"];
const onRenderTracked: typeof import("vue")["onRenderTracked"];
const onRenderTriggered: typeof import("vue")["onRenderTriggered"];
const onScopeDispose: typeof import("vue")["onScopeDispose"];
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
const onUnmounted: typeof import("vue")["onUnmounted"];
const onUpdated: typeof import("vue")["onUpdated"];
const provide: typeof import("vue")["provide"];
const reactive: typeof import("vue")["reactive"];
const readonly: typeof import("vue")["readonly"];
const ref: typeof import("vue")["ref"];
const resolveComponent: typeof import("vue")["resolveComponent"];
const set: typeof import("@vueuse/core")["set"];
const shallowReactive: typeof import("vue")["shallowReactive"];
const shallowReadonly: typeof import("vue")["shallowReadonly"];
const shallowRef: typeof import("vue")["shallowRef"];
const toRaw: typeof import("vue")["toRaw"];
const toRef: typeof import("vue")["toRef"];
const toRefs: typeof import("vue")["toRefs"];
const toValue: typeof import("vue")["toValue"];
const triggerRef: typeof import("vue")["triggerRef"];
const unref: typeof import("vue")["unref"];
const useAsyncState: typeof import("@vueuse/core")["useAsyncState"];
const useAttrs: typeof import("vue")["useAttrs"];
const useAuth: typeof import("./composables/useAuth")["useAuth"];
const useCssModule: typeof import("vue")["useCssModule"];
const useCssVars: typeof import("vue")["useCssVars"];
const useDevice: typeof import("./composables/useDevice")["useDevice"];
const useDisclosure: typeof import("./composables/useDisclosure")["default"];
const useEventBus: typeof import("./composables/useEventBus")["default"];
const useLink: typeof import("vue-router")["useLink"];
const useLoading: typeof import("./composables/useLoading")["default"];
const useRoute: typeof import("vue-router")["useRoute"];
const useRouter: typeof import("vue-router")["useRouter"];
const useSlots: typeof import("vue")["useSlots"];
const useVueApp: typeof import("./composables/useVueApp")["default"];
const v: typeof import("@vueuse/core")["get"];
const watch: typeof import("vue")["watch"];
const watchEffect: typeof import("vue")["watchEffect"];
const watchPostEffect: typeof import("vue")["watchPostEffect"];
const watchSyncEffect: typeof import("vue")["watchSyncEffect"];
const ChargerInformation: typeof import("./components/common/vehicle-detail/ChargerInformation.vue")["default"]
const Container: typeof import('./components/base/Container.vue')['default']
const EffectScope: typeof import('vue')['EffectScope']
const Header: typeof import("./components/base/Header.vue")["default"]
const HistoryDetail: typeof import('./components/common/vehicle-detail/HistoryDetail.vue')['default']
const Primary: typeof import('./components/common/my-button/Button.stories.js')['Primary']
const Secondary: typeof import('./components/common/my-button/Button.stories.js')['Secondary']
const Sidebar: typeof import('./components/base/Sidebar.vue')['default']
const buttonStories: typeof import('./components/common/my-button/Button.stories.js')['default']
const chargerInput: typeof import('./components/common/charger-input/index.vue')['default']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const myButton: typeof import('./components/common/my-button/index.vue')['default']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const set: typeof import('@vueuse/core')['set']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
const useAttrs: typeof import('vue')['useAttrs']
const useAuth: typeof import('./composables/useAuth')['useAuth']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useDevice: typeof import('./composables/useDevice')['useDevice']
const useDisclosure: typeof import('./composables/useDisclosure')['default']
const useEventBus: typeof import('./composables/useEventBus')['default']
const useLink: typeof import('vue-router')['useLink']
const useLoading: typeof import('./composables/useLoading')['default']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const useVueApp: typeof import('./composables/useVueApp')['default']
const v: typeof import('@vueuse/core')['get']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type {
Component,
ComponentPublicInstance,
ComputedRef,
InjectionKey,
PropType,
Ref,
VNode,
} from "vue";
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}
8 changes: 4 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vue from "@vitejs/plugin-vue";
import AutoImport from "unplugin-auto-import/vite";
import SvgLoader from "vite-svg-loader";
import { checker } from "vite-plugin-checker";
import { visualizer } from "rollup-plugin-visualizer";
// import { visualizer } from "rollup-plugin-visualizer";
import Pages from "vite-plugin-pages";
import Layouts from "vite-plugin-vue-layouts";

Expand Down Expand Up @@ -32,9 +32,9 @@ export default defineConfig({
checker({
typescript: true,
}),
visualizer({
emitFile: false,
}),
// visualizer({
// emitFile: false,
// }),
AutoImport({
include: [
/\.[t]s?$/, // .ts
Expand Down

0 comments on commit 9e845ae

Please sign in to comment.