File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ import { dataURIPlugin } from './plugins/dataUri'
60
60
import { buildImportAnalysisPlugin } from './plugins/importAnalysisBuild'
61
61
import { ssrManifestPlugin } from './ssr/ssrManifestPlugin'
62
62
import { buildLoadFallbackPlugin } from './plugins/loadFallback'
63
- import { findNearestPackageData } from './packages'
63
+ import { findNearestMainPackageData , findNearestPackageData } from './packages'
64
64
import type { PackageCache } from './packages'
65
65
import {
66
66
getResolvedOutDirs ,
@@ -919,7 +919,7 @@ export function resolveLibFilename(
919
919
return libOptions . fileName ( format , entryName )
920
920
}
921
921
922
- const packageJson = findNearestPackageData ( root , packageCache ) ?. data
922
+ const packageJson = findNearestMainPackageData ( root , packageCache ) ?. data
923
923
const name =
924
924
libOptions . fileName ||
925
925
( packageJson && typeof libOptions . entry === 'string'
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ import type { TransformPluginContext } from '../server/pluginContainer'
91
91
import { searchForWorkspaceRoot } from '../server/searchRoot'
92
92
import { type DevEnvironment } from '..'
93
93
import type { PackageCache } from '../packages'
94
- import { findNearestPackageData } from '../packages'
94
+ import { findNearestMainPackageData } from '../packages'
95
95
import { addToHTMLProxyTransformResult } from './html'
96
96
import {
97
97
assetUrlRE ,
@@ -3462,9 +3462,8 @@ export function resolveLibCssFilename(
3462
3462
return `${ libOptions . fileName } .css`
3463
3463
}
3464
3464
3465
- const packageJson = findNearestPackageData ( root , packageCache ) ?. data
3466
- const name =
3467
- packageJson && packageJson . name ? getPkgName ( packageJson . name ) : undefined
3465
+ const packageJson = findNearestMainPackageData ( root , packageCache ) ?. data
3466
+ const name = packageJson ? getPkgName ( packageJson . name ) : undefined
3468
3467
3469
3468
if ( ! name )
3470
3469
throw new Error (
You can’t perform that action at this time.
0 commit comments