-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add asset name (#3028) #3050
Conversation
I hope this gets added. I'm kind of confused right now how we are supposed to make use of manifest.json in its current state. |
We discussed this with Evan and we have his approval to merge this feat. @doabit would you merge main so we test this with the latest CI and test suite? |
@patak-js Merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm rechecking the docs for https://rollupjs.org/guide/en/#thisemitfileemittedfile-emittedchunk--emittedasset--string, name
is also a way to define the output fileName using the assetFileNames
pattern in case fileName is not provided to emmitFile
. We are providing fileName, so whatever name
we use is ignored here.
@doabit Just to check here, do you have an example where this pattern is used elsewhere in the rollup ecosystem? Even if this not standard, I think it makes sense in our context.
@patak-js Sorry, for me, this PR is just to solve the problem of custom |
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Description
Add name property for asset type bundle. The PR can solve the problem for #3028.
Additional context
It can solve the #3026 and other similar problem too. With the asset name, everyone can generate custom manifest format for need. eg the old manifest format
The
manifest.json
should looks likeThen can get the
assets/demo.098465ec.png
byimages/demo.png
for backend.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).