Comparing version 4.2.1 to 4.2.2
@@ -58,3 +58,3 @@ #!/usr/bin/env node | ||
var version = "4.2.1"; | ||
var version = "4.2.2"; | ||
@@ -61,0 +61,0 @@ const helpMessage = ` |
@@ -662,3 +662,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
module: 'esnext', | ||
jsx: tsCompilerOptions.jsx || 'react' | ||
jsx: tsCompilerOptions.jsx || 'react-jsx' | ||
}; | ||
@@ -1015,20 +1015,19 @@ const typesPlugins = [ | ||
name: 'collect-sizes', | ||
augmentChunkHash () { | ||
// Do nothing, but use the hook to keep the plugin instance alive | ||
}, | ||
renderChunk (code, chunk, options) { | ||
const sourceId = chunk.facadeModuleId || ''; | ||
const dir = options.dir || options.file && path__default.default.dirname(options.file); | ||
let fileName = chunk.fileName; | ||
if (dir) { | ||
writeBundle (options, bundle) { | ||
const dir = options.dir || path__default.default.dirname(options.file); | ||
Object.entries(bundle).forEach(([fileName, chunk])=>{ | ||
const filePath = path__default.default.join(dir, fileName); | ||
fileName = filePath.startsWith(cwd) ? path__default.default.relative(cwd, filePath) : filePath; | ||
} | ||
addSize({ | ||
fileName, | ||
size: code.length, | ||
sourceFileName: sourceId, | ||
exportPath: reversedMapping.get(sourceId) || '.' | ||
if (chunk.type !== 'chunk') { | ||
return; | ||
} | ||
const size = chunk.code.length; | ||
const sourceFileName = chunk.facadeModuleId || ''; | ||
const exportPath = reversedMapping.get(sourceFileName) || '.'; | ||
addSize({ | ||
fileName: filePath.startsWith(cwd) ? path__default.default.relative(cwd, filePath) : filePath, | ||
size, | ||
sourceFileName, | ||
exportPath | ||
}); | ||
}); | ||
return null; | ||
} | ||
@@ -1035,0 +1034,0 @@ }; |
{ | ||
"name": "bunchee", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "zero config bundler for js/ts/jsx libraries", | ||
@@ -28,2 +28,4 @@ "bin": "./dist/bin/cli.js", | ||
"library", | ||
"css", | ||
"web", | ||
"server components" | ||
@@ -30,0 +32,0 @@ ], |
# bunchee | ||
> zero config bundler for JavaScript/TypeScript/JSX library | ||
> Zero-config bundler for frontend libraries. | ||
@@ -18,2 +18,3 @@ ![bunchee](https://repository-images.githubusercontent.com/154026156/5d132698-0ff5-4644-a4fd-d9570e6229bc) | ||
Bunchee makes bundling your library into one file effortless, with zero configuration required. It is built on top of Rollup and SWC ⚡️, allowing you to focus on writing code and generating multiple module types (CommonJS, ESModules) simultaneously. | ||
It uses the standard exports configuration in `package.json` as the only source of truth, and uses entry file conventions to match your exports and build them into bundles. | ||
@@ -20,0 +21,0 @@ ## Quick Start |
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
68396
405
1488