v1.6.1: Browser dist entry point is an empty stub, breaking all named exports
Expected Behavior
dist/browser/index.js should contain the full pre-bundled browser build with all named exports (Jimp, ResizeStrategy, etc.), as it does in v1.6.0.
Current Behavior
In v1.6.1, dist/browser/index.js is a 3-line stub that exports nothing:
export {};
// A stub. The real build is done by rollup.
//# sourceMappingURL=index-browser.mjs.mapSimilarly, dist/browser/index.d.ts is:
export {};
//# sourceMappingURL=index-browser.d.mts.mapThis causes any bundler that resolves the browser export condition (e.g. Rollup's nodeResolve({ browser: true }), Webpack) to get an empty module. Named imports like import { Jimp, ResizeStrategy } from "jimp" silently resolve to undefined, causing runtime errors.
Failure Information (for bugs)
Steps to Reproduce
- Install
[email protected](orjimp@^1.6.0which resolves to 1.6.1) - Use any bundler that respects the
browserexport condition inpackage.json(Rollup with@rollup/plugin-node-resolve({ browser: true }), Webpack, Stencil, etc.) - Import named exports:
import { Jimp, ResizeStrategy } from "jimp"; - The imports resolve to
undefinedbecause the browser entry point is a stub
Comparison:
| File | v1.6.0 | v1.6.1 |
|---|---|---|
dist/browser/index.js |
727KB, 236 lines, full bundle with exports | 98 bytes, stub: export {}; |
dist/browser/index.d.ts |
116KB, 1764 lines of type declarations | 55 bytes, stub: export {}; |
dist/browser/index.js.map |
2.9MB | 3.0MB (references full build sources) |
Note that the sourcemap in 1.6.1 references all the expected source files and is actually larger than the 1.6.0 sourcemap — suggesting the full Rollup build ran but its output was not written to dist/browser/index.js.
The package.json exports field still points to the stub:
".": {
"browser": {
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
}
}Context
- Jimp Version: 1.6.1 (1.6.0 works correctly)
- Operating System: macOS Darwin 25.3.0
- Node version: v24.3.0
Failure Logs
jimp__WEBPACK_IMPORTED_MODULE_2__.ResizeStrategy).BILINEAR
^-- ResizeStrategy is undefined
Attempted import error: 'Jimp' is not exported from 'jimp' (imported as '$hgUW1$Jimp').
Source: jimp-dev/jimp