Packaging problem fix (#8059)

This commit is contained in:
labbomb 2022-01-15 13:15:05 +08:00 committed by GitHub
parent 4ea603bb43
commit 805ad72e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View File

@ -7,12 +7,12 @@
"build:prod": "vue-tsc --noEmit && vite build --mode production",
"preview": "vite preview",
"lint": "eslint src --fix --ext .ts,.tsx,.vue",
"prettier": "prettier --write src/**/*.{vue,ts,tsx}"
"prettier": "prettier --write \"src/**/*.{vue,ts,tsx}\""
},
"dependencies": {
"@vueuse/core": "^7.5.3",
"axios": "^0.24.0",
"date-fns": "^2.28.0",
"date-fns": "^2.27.0",
"echarts": "^5.2.2",
"lodash": "^4.17.21",
"monaco-editor": "^0.31.1",

View File

@ -19,6 +19,7 @@ import { useRouter } from 'vue-router'
import { logout } from '@/service/modules/logout'
import { useUserStore } from '@/store/user/user'
import type { Router } from 'vue-router'
import { DropdownOption } from 'naive-ui'
export function useDropDown() {
const router: Router = useRouter()

View File

@ -53,7 +53,7 @@ export default defineComponent({
const router: Router = useRouter()
const fileId = ref(Number(router.currentRoute.value.params.id) || -1)
const reload = inject('reload')
const reload:any = inject('reload')
const resourceListRef = ref()
const folderShowRef = ref(false)
const uploadShowRef = ref(false)

View File

@ -22,6 +22,7 @@ import viteCompression from 'vite-plugin-compression'
import path from 'path'
export default defineConfig({
base: process.env.NODE_ENV === 'production' ? './' : '/',
plugins: [
vue(),
vueJsx(),
@ -30,7 +31,8 @@ export default defineConfig({
disable: false,
threshold: 10240,
algorithm: 'gzip',
ext: '.gz'
ext: '.gz',
deleteOriginFile: false
})
],
build: {
@ -43,7 +45,9 @@ export default defineConfig({
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
'@': path.resolve(__dirname, 'src'),
// resolve vue-i18n warning: You are running the esm-bundler build of vue-i18n.
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js'
}
}
})