prebundle 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -92,19 +92,18 @@ function parseTasks(dependencies, globalPrettier) {
|
|
|
92
92
|
const result = [];
|
|
93
93
|
for (const dep of dependencies){
|
|
94
94
|
const depName = 'string' == typeof dep ? dep : dep.name;
|
|
95
|
-
const dtsOnly = 'string' == typeof dep ? false : dep.dtsOnly ?? false;
|
|
96
95
|
const importPath = join(cwd, DIST_DIR, depName);
|
|
97
96
|
const distPath = join(cwd, DIST_DIR, depName);
|
|
98
|
-
const depPath =
|
|
99
|
-
if (!depPath
|
|
100
|
-
const depEntry =
|
|
97
|
+
const depPath = findDepPath(depName);
|
|
98
|
+
if (!depPath) throw new Error(`Failed to resolve dependency: ${depName}`);
|
|
99
|
+
const depEntry = helper_require.resolve(depName, {
|
|
101
100
|
paths: [
|
|
102
101
|
cwd
|
|
103
102
|
]
|
|
104
103
|
});
|
|
105
104
|
const info = {
|
|
106
105
|
depName,
|
|
107
|
-
depPath
|
|
106
|
+
depPath,
|
|
108
107
|
depEntry,
|
|
109
108
|
distPath,
|
|
110
109
|
importPath
|