fix: 🐛 js.map file use js file's path in stat.json#1506
Conversation
Walkthrough此次修改优化了 Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- crates/mako/src/generate/mod.rs (1 hunks)
Additional comments not posted (1)
crates/mako/src/generate/mod.rs (1)
570-579: 更改路径处理逻辑引入的
source_map_file_path变量用于存储 source map 文件的路径,并传递给stats_info.add_assets。这符合 PR 的目标,确保stat.json中的路径字段正确反映 source map 文件的位置。
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- crates/mako/src/generate.rs (1 hunks)
Additional comments not posted (1)
crates/mako/src/generate.rs (1)
569-579: 改进了 source_map_file_path 的构建方式这段代码通过
context.config.output.path和chunk_file.source_map_disk_name()来构建source_map_file_path,确保了 source map 文件路径的正确性。这一改动提高了资产信息的准确性,符合 PR 的目标。
problem
AssetsInfo { assets_type: "asset", size: 8986250, name: "index.js.map", hashname: "index.b05c1236.js.map", chunk_id: "src/index.tsx", path: "/Users/mako/examples/with-antd/dist/index.b05c1236.js", },the path field shoud be
xxx.hash.js.mapand no more mod.rs
Summary by CodeRabbit