File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,18 +59,19 @@ export function parseTasks(
5959
6060 for ( const dep of dependencies ) {
6161 const depName = typeof dep === 'string' ? dep : dep . name ;
62+ const dtsOnly = typeof dep === 'string' ? false : ( dep . dtsOnly ?? false ) ;
6263 const importPath = join ( cwd , DIST_DIR , depName ) ;
6364 const distPath = join ( cwd , DIST_DIR , depName ) ;
64- const depPath = findDepPath ( depName ) ;
65+ const depPath = dtsOnly ? null : findDepPath ( depName ) ;
6566
66- if ( ! depPath ) {
67+ if ( ! depPath && ! dtsOnly ) {
6768 throw new Error ( `Failed to resolve dependency: ${ depName } ` ) ;
6869 }
6970
70- const depEntry = require . resolve ( depName , { paths : [ cwd ] } ) ;
71+ const depEntry = dtsOnly ? '' : require . resolve ( depName , { paths : [ cwd ] } ) ;
7172 const info = {
7273 depName,
73- depPath,
74+ depPath : depPath ?? '' ,
7475 depEntry,
7576 distPath,
7677 importPath,
You can’t perform that action at this time.
0 commit comments