Skip to content

fix(assets): proper asset details displaying for .map or other non-module assets#70

Merged
antfu merged 5 commits into
vitejs:mainfrom
liangmiQwQ:fix/proper-asset-details-displaying
Aug 8, 2025
Merged

fix(assets): proper asset details displaying for .map or other non-module assets#70
antfu merged 5 commits into
vitejs:mainfrom
liangmiQwQ:fix/proper-asset-details-displaying

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

Problem

Assets page will display the .map and other assets not created from a chunk, and It can be click but nothing in it like this.

A blank for the asset

And there is also some error in console (sever-side)

 ERROR  ⬢ RPC error on executing "vite:rolldown:get-asset-details":                                                                        16:56:48
 ERROR  Cannot read properties of undefined (reading 'imports')        

We can't assert assetChunkId is not null and it caused the problem

Fixes

Added some if(..){} to judge if assetChunkId is null, and render differently on the client-side

Now it displays normally especially to Source Map

After

And there won't be error anymore in the console

@antfu antfu merged commit b004396 into vitejs:main Aug 8, 2025
4 checks passed
@liangmiQwQ liangmiQwQ deleted the fix/proper-asset-details-displaying branch October 1, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants