Comparing version 4.4.5 to 4.4.6
@@ -484,9 +484,9 @@ #!/usr/bin/env node | ||
} else { | ||
// Validate CJS package | ||
if (main && path__default.default.extname(main) === '.mjs') { | ||
state.badMainExtension = true; | ||
} | ||
// Validate CJS package | ||
if (exports) { | ||
if (typeof exports === 'string') { | ||
if (!hasCjsExtension(exports)) { | ||
if (path__default.default.extname(exports) === '.mjs') { | ||
state.badMainExport = true; | ||
@@ -527,3 +527,7 @@ } | ||
if (state.badMainExport) { | ||
logger.warn('Cannot export `exports` field with .cjs extension in ESM package, only .mjs and .js extensions are allowed'); | ||
if (isESM) { | ||
logger.warn('Cannot export `exports` field with .cjs extension in ESM package, only .mjs and .js extensions are allowed'); | ||
} else { | ||
logger.warn('Cannot export `exports` field with .mjs extension in CJS package, only .js and .cjs extensions are allowed'); | ||
} | ||
} | ||
@@ -559,3 +563,3 @@ if (state.invalidExportsFieldType) { | ||
var version = "4.4.5"; | ||
var version = "4.4.6"; | ||
@@ -562,0 +566,0 @@ function relativify(path) { |
{ | ||
"name": "bunchee", | ||
"version": "4.4.5", | ||
"version": "4.4.6", | ||
"description": "zero config bundler for js/ts/jsx libraries", | ||
@@ -5,0 +5,0 @@ "bin": "./dist/bin/cli.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122126
2675