/// // vue3导入模块报红解决方案——找不到模块“./XXX.vue”或其相应的类型声明 // 报错原因是:typescript 只能理解 .ts 文件,无法理解 .vue文件 // 因此需要给.vue文件加上类型说明文件 declare module '*.vue' { import type { DefineComponent } from 'vue' // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component } declare module 'lodash-es' { import { includes, isEmpty, ceil, divide } from 'lodash'; export { includes, isEmpty, ceil, divide }; } interface ImportMetaEnv { // 项目名称 readonly VITE_APP_NAME: string; // 当前环境 readonly VITE_APP_ENV: 'development' | 'production'; // 启动端口 readonly VITE_APP_PORT: number; // axios readonly VITE_APP_BASE_API: string; readonly VITE_APP_PROXY_URL: string; // RSA公钥 readonly VITE_APP_RSA_PUBLIC_KEY: string; }