mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-12 03:33:41 +08:00
build(projects): vite.config代码优化
This commit is contained in:
15
build/config/path.ts
Normal file
15
build/config/path.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
/**
|
||||
* 解析路径
|
||||
* @param basePath - 基础路径
|
||||
*/
|
||||
export function resolvePath(rootPath: string, basePath: string) {
|
||||
const root = fileURLToPath(new URL(rootPath, basePath));
|
||||
const src = `${root}src`;
|
||||
|
||||
return {
|
||||
root,
|
||||
src,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user