v1.6.1: Browser dist entry point is an empty stub, breaking all named exports
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rollup, typescript
- 領域
- build-system
調査の方向性
まず、package.json のブラウザー向けエクスポートと、dist/browser/index.js および dist/browser/index.d.ts を生成する Rollup のビルド設定を調べます。v1.6.0 と v1.6.1 のアーティファクトを比較し、その後、ブラウザー対応の bundler で失敗を再現します。ブラウザー用ファイルに完全なビルドが含まれ、Jimp や ResizeStrategy などの名前付きインポートが機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.map
Similarly, dist/browser/index.d.ts is:
export {};
//# sourceMappingURL=index-browser.d.mts.map
This 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').
- 主要言語
- TypeScript
- スター
- 14.7k
- フォーク
- 777
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jimp-dev/jimp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Add blit changes to migration guide.対応中かも @ryanchou1994 が 44 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
documentation help wanted solution in issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
excaliburjs/Excalibur#3895 ·
メンテナーはふだん 3 日以内に返信
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected対応中かも @Steve-20-ai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp対応中かも @Gurkaran18 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
joinmarket-webui/jam#1588 ·
メンテナーはふだん 3 日以内に返信
-
BeOS .json missingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mihaip/infinite-mac#475 ·