File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
website/docs/zh/config/lib Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -967,15 +967,13 @@ const composeEntryConfig = async (
967967 const resolvedEntries : Record < string , string > = { } ;
968968
969969 const resolveOutBase = async ( resolvedEntryFiles : string [ ] ) => {
970+ if ( userOutBase !== undefined ) {
971+ return path . resolve ( root , userOutBase ) ;
972+ }
970973 // Similar to `rootDir` in tsconfig and `outbase` in esbuild.
971- const lcp = await calcLongestCommonPath ( resolvedEntryFiles ) ;
972- // Using the longest common path of all non-declaration input files by default.
973- const outBase = userOutBase
974- ? path . resolve ( root , userOutBase )
975- : lcp === null
976- ? root
977- : lcp ;
978- return outBase ;
974+ // Using the longest common path of all non-declaration input files if not specified.
975+ const lcp = ( await calcLongestCommonPath ( resolvedEntryFiles ) ) ?? root ;
976+ return lcp ;
979977 } ;
980978
981979 for ( const key of Object . keys ( entries ) ) {
Original file line number Diff line number Diff line change 2828 └── index.ts
2929```
3030
31- 如果未指定输出基础目录,则默认使用所有输入入口点路径的最近公共祖先目录 ,即 ` src/utils ` ,最终的文件输出结构为:
31+ 如果未指定基础输出目录,则默认使用所有输入入口文件路径的最近公共祖先目录 ,即 ` src/utils ` ,最终的文件输出结构为:
3232
3333``` txt
3434dist
You can’t perform that action at this time.
0 commit comments