Skip to content

Commit

Permalink
perf(projects): perf code
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Nov 9, 2023
1 parent 910fe4e commit 3f22efa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_ROUTER_HISTORY_MODE=history
VITE_ROUTER_HISTORY_MODE=history
VITE_SOURCE_MAP=N
2 changes: 1 addition & 1 deletion src/components/common/reload-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defineProps<Props>();

<template>
<ButtonIcon :tooltip-content="$t('icon.reload')">
<icon-ant-design:reload-outlined :class="{ 'animate-spin animate-duration-750': loading }" />
<icon-ant-design-reload-outlined :class="{ 'animate-spin animate-duration-750': loading }" />
</ButtonIcon>
</template>

Expand Down
3 changes: 1 addition & 2 deletions src/typings/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ declare module 'vue' {
DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default']
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
'IconAntDesign:reloadOutlined': typeof import('~icons/ant-design/reload-outlined')['default']
IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default']
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
IconLocalLogo: typeof import('~icons/local/logo')['default']
'IconMajesticons:colorSwatchLine': typeof import('~icons/majesticons/color-swatch-line')['default']
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
LookForward: typeof import('./../components/custom/look-forward.vue')['default']
MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
Expand Down
4 changes: 4 additions & 0 deletions src/typings/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@ declare namespace Env {
* @description iconify icon name
*/
readonly VITE_MENU_ICON: string;
/**
* whether to build with sourcemap
*/
readonly VITE_SOURCE_MAP?: Common.YesOrNo;
}
}
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ export default defineConfig(configEnv => {
open: true,
proxy: createViteProxy(viteEnv)
},
preview: {
port: 9725
},
build: {
reportCompressedSize: false,
sourcemap: true,
sourcemap: viteEnv.VITE_SOURCE_MAP === 'Y',
commonjsOptions: {
ignoreTryCatch: false
}
Expand Down

0 comments on commit 3f22efa

Please sign in to comment.