fix: 打包问题
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
dece1db47c
commit
1f1013a173
14
src/App.vue
14
src/App.vue
|
|
@ -1,10 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
||||
import { LineChart } from 'echarts/charts'
|
||||
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
||||
import * as echarts from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
|
||||
import { navigateToInterceptor } from '@/router/interceptor'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { tabbarStore } from './tabbar/store'
|
||||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
||||
|
||||
// 注册 ECharts 组件
|
||||
echarts.use([
|
||||
LineChart,
|
||||
GridComponent,
|
||||
LegendComponent,
|
||||
TooltipComponent,
|
||||
CanvasRenderer,
|
||||
])
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 不需要登录验证的页面路径
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
import type * as API from '@/service/types'
|
||||
|
||||
import { useQuery } from '@tanstack/vue-query'
|
||||
import { LineChart } from 'echarts/charts'
|
||||
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
|
||||
import * as echarts from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import UniEcharts from 'uni-echarts'
|
||||
import { computed, ref } from 'vue'
|
||||
import { teacherAnalysisTrendUsingPost } from '@/service/laoshichengjifenxi'
|
||||
import { useHomeStore } from '@/store/home'
|
||||
|
|
@ -19,15 +16,6 @@ const emit = defineEmits<{
|
|||
openCompareClassDialog: []
|
||||
}>()
|
||||
|
||||
// 注册 ECharts 组件
|
||||
echarts.use([
|
||||
LineChart,
|
||||
GridComponent,
|
||||
LegendComponent,
|
||||
TooltipComponent,
|
||||
CanvasRenderer,
|
||||
])
|
||||
|
||||
// 类型别名
|
||||
type TrendInfo = API.TrendInfo
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"lib": ["esnext", "dom"],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"moduleResolution": "bundler",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@img/*": ["./src/static/*"]
|
||||
|
|
@ -16,7 +16,8 @@
|
|||
"miniprogram-api-typings",
|
||||
"wot-design-uni/global.d.ts",
|
||||
"z-paging/types",
|
||||
"./src/typings.d.ts"
|
||||
"./src/typings.d.ts",
|
||||
"uni-echarts/global"
|
||||
],
|
||||
"allowJs": true,
|
||||
"noImplicitThis": true,
|
||||
|
|
@ -35,7 +36,8 @@
|
|||
"src/**/*.tsx",
|
||||
"src/**/*.jsx",
|
||||
"src/**/*.vue",
|
||||
"src/**/*.json"
|
||||
"src/**/*.json",
|
||||
"vite.config.ts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import Optimization from '@uni-ku/bundle-optimizer'
|
|||
import dayjs from 'dayjs'
|
||||
import { visualizer } from 'rollup-plugin-visualizer'
|
||||
import { UniEchartsResolver } from 'uni-echarts/resolver'
|
||||
import { UniEcharts } from 'uni-echarts/vite'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
|
|
@ -61,6 +62,7 @@ export default ({ command, mode }) => {
|
|||
envDir: './env', // 自定义env目录
|
||||
base: VITE_APP_PUBLIC_BASE,
|
||||
plugins: [
|
||||
UniEcharts(),
|
||||
vueDevTools(),
|
||||
UniPages({
|
||||
exclude: ['**/components/**/**.*'],
|
||||
|
|
@ -91,9 +93,6 @@ export default ({ command, mode }) => {
|
|||
dts: 'src/types/auto-import.d.ts',
|
||||
dirs: ['src/hooks'], // 自动导入 hooks
|
||||
vueTemplate: true, // default false
|
||||
resolvers: [
|
||||
UniEchartsResolver(),
|
||||
],
|
||||
}),
|
||||
// Optimization 插件需要 page.json 文件,故应在 UniPages 插件之后执行
|
||||
Optimization({
|
||||
|
|
@ -156,7 +155,9 @@ export default ({ command, mode }) => {
|
|||
],
|
||||
},
|
||||
},
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['uni-echarts'],
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.join(process.cwd(), './src'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue