alias.ts 512 B

12345678910111213141516171819
  1. import {resolve} from 'path';
  2. import {appDirection} from './paths.ts';
  3. function aliasPath(url: string) {
  4. return resolve(appDirection, 'src/', url);
  5. }
  6. export default {
  7. '@styles': aliasPath('styles'),
  8. '@assets': aliasPath('assets'),
  9. '@routes': aliasPath('routes'),
  10. '@apis': aliasPath('apis'),
  11. '@components': aliasPath('components'),
  12. '@hooks': aliasPath('hooks'),
  13. '@pages': aliasPath('pages'),
  14. '@stores': aliasPath('stores'),
  15. '@utils': aliasPath('utils'),
  16. '@models': aliasPath('models'),
  17. };