-
Notifications
You must be signed in to change notification settings - Fork 9.5k
增加类似于 webpack path alias 的功能 #2130
Copy link
Copy link
Closed
Labels
RSS enhancementNew feature or request to existing RSSNew feature or request to existing RSS
Description
这是一个什么样的功能?
目前在各路由(/lib/routes/*)里引用 utils 需要通过相对路径来引用,可否提供一个类webpack path alias 的功能,通过绝对路径来引用工具包。
这个功能可以解决什么问题?
解决复制粘贴时依赖引用路径不一致问题,让acv三连击更流畅(cmd + a, cmd + c, cmd + v).
before:
File A
const fetch = require('../../utils/axios')
File B
const fetch = require('../../../utils/axios')
after:
File A
const fetch = require('@/utils/axios')
File B
const fetch = require('@/utils/axios')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RSS enhancementNew feature or request to existing RSSNew feature or request to existing RSS