webpack-manifest-plugin: Breaks when chunk has multiple files with the same extension
Hello!
Since this package builds the memo object keys only using the chunk name and the file extension(see here), it breaks when the chunk has multiple files with the same extension. For e.g.
index.css
index.above.css
It outputs something like this
"/fancy/project/dist/index.css": "/fancy/project/dist/index.99b9974b.above.css"
I could send in a PR if we could agree on how to handle these cases.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 7
- Comments: 15 (7 by maintainers)
I encountered this problem today and worked around it by simply removing the hash in the file name using map. My case was slightly different to this but I’ve modified my solution to this use case and hopefully the below will help.
Hopefully for you this will work:
However the hash we are using may be the same for all files with the same entry (a problem I had). If so you could do a messier version:
Neither of these are tested, but maybe they will help you get a workaround in place 😄
+1
Hi. This is our project setup.
Setup
Expected manifest.json output
Actual manifest.json output
Sure! So this is our setup:
Expected manifest.json output
Actual manifest.json output