mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
23 lines
568 B
JavaScript
23 lines
568 B
JavaScript
export default (api) => {
|
|
const { paths } = api;
|
|
|
|
api.describe({
|
|
key: 'alias',
|
|
config: {
|
|
schema(joi) {
|
|
return joi.object();
|
|
},
|
|
default: {
|
|
}
|
|
}
|
|
});
|
|
|
|
api.chainWebpack(async (memo) => {
|
|
// 选择在 chainWebpack 中进行以上 alias 的初始化,是为了支持用户使用 modifyPaths API 对 paths 进行改写
|
|
memo.resolve.alias.set('@', paths.absSrcPath);
|
|
memo.resolve.alias.set('@@', paths.absTmpPath);
|
|
|
|
return memo;
|
|
});
|
|
};
|