alia设置不生效
#6881
Replies: 1 comment
-
Poor guy |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
utils文件夹路径为/src/utils,在.umirc.ts中配置了alias
import { defineConfig } from 'umi'; const path = require('path'); export default defineConfig({ nodeModulesTransform: { type: 'none', }, routes: [ { path: '/', component: '@/pages/ucAdmin/index' }, ], alias: { utils: '@/utils', components:'@/components', },
/src/pages/ucadmin/service.js如下:
import {api,request} from /'utils/' export async function osUserQueryUser(params,config) { return request.get(api.osUserQueryUser, params,config); }
build时报错如下:
This dependency was not found:* utils in ./src/pages/ucAdmin/service.js
Beta Was this translation helpful? Give feedback.
All reactions