feat: Configure the root directory alias #1739 (#2875)

### What problem does this PR solve?

feat: Configure the root directory alias #1739

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
This commit is contained in:
balibabu
2024-10-17 11:36:01 +08:00
committed by GitHub
parent 6a60e26020
commit bedb05012d
4 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,4 @@
import path from 'path';
import { defineConfig } from 'umi';
import { appName } from './src/conf.json';
import routes from './src/routes';
@ -5,7 +6,7 @@ import routes from './src/routes';
export default defineConfig({
title: appName,
outputPath: 'dist',
// alias: { '@': './src' },
alias: { root: path.resolve('../') },
npmClient: 'npm',
base: '/',
routes,