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 CHANGED
@@ -97,7 +97,7 @@ function _fileExists() {
97
97
  return _fileExists.apply(this, arguments);
98
98
  }
99
99
 
100
- var version = "3.3.2";
100
+ var version = "3.3.4";
101
101
 
102
102
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
103
103
  try {
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
- Object.keys(exportsCondition).forEach((key)=>{
272
- const value = exportsCondition[key];
273
- findExport(key, value, paths, packageType);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunchee",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "description": "zero config bundler for js/ts/jsx libraries",
5
5
  "bin": {
6
6
  "bunchee": "./dist/cli.js"