bunchee 3.3.2 → 3.3.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/cli.js +1 -1
- package/dist/index.js +9 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -268,10 +268,14 @@ function findExport(name, value, paths, packageType) {
|
|
|
268
268
|
if (typeof exportsCondition === 'string') {
|
|
269
269
|
paths['.'] = constructFullExportCondition(exportsCondition, packageType);
|
|
270
270
|
} else if (typeof exportsCondition === 'object') {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
if (isExportLike(exportsCondition)) {
|
|
272
|
+
paths['.'] = constructFullExportCondition(exportsCondition, packageType);
|
|
273
|
+
} else {
|
|
274
|
+
Object.keys(exportsCondition).forEach((key)=>{
|
|
275
|
+
const value = exportsCondition[key];
|
|
276
|
+
findExport(key, value, paths, packageType);
|
|
277
|
+
});
|
|
278
|
+
}
|
|
275
279
|
}
|
|
276
280
|
return paths;
|
|
277
281
|
}
|
|
@@ -749,9 +753,9 @@ function _resolveTsConfig() {
|
|
|
749
753
|
_resolveTsConfig = _async_to_generator$1(function*(cwd) {
|
|
750
754
|
let tsCompilerOptions = {};
|
|
751
755
|
let tsConfigPath;
|
|
752
|
-
const ts = resolveTypescript(cwd);
|
|
753
756
|
tsConfigPath = path.resolve(cwd, 'tsconfig.json');
|
|
754
757
|
if (yield fileExists(tsConfigPath)) {
|
|
758
|
+
const ts = resolveTypescript(cwd);
|
|
755
759
|
const basePath = tsConfigPath ? path.dirname(tsConfigPath) : cwd;
|
|
756
760
|
const tsconfigJSON = ts.readConfigFile(tsConfigPath, ts.sys.readFile).config;
|
|
757
761
|
tsCompilerOptions = ts.parseJsonConfigFileContent(tsconfigJSON, ts.sys, basePath).options;
|