Conversation
Note that I had to modify listAssets to support recursive assets
|
|
|
I'll add this proposal to the team board for future discussion. About the tests, I think we shouldn't re-run the whole assets playground for this one. Maybe we could add this config to some of the other playgrounds to avoid creating new ones. But we can wait to see what others think about this feature before that. To be honest, we didn't have much requests so far except for the linked discussion but I agree that not having the complete path to be able to use |
|
@karlvr we discussed this PR in today's team meeting and the consensus was that being able to keep the assets structure doesn't justify at this point maintaining an extra config option. We haven't had many requests for this in the past years so it seems there is not enough demand for this extra flexibility. Let's close the PR for now, but thanks for bringing the idea forward. |
|
@patak-dev There is absolutely demand for this |
|
yes, there is demand for this |
|
it's possible using originalFilename like this |
Seriously? It's frustrating that |
|
Still demand for this |
Description
Add an option to stop flattening the assets directory when building. On sites with a lot of static assets, it can be nice to preserve the directory structure that the developer created to manage the files... it helps debugging the bundle as the files are in their expected locations (just with a hashed name).
I found this discussion of this topic #2447, and I think this config option solves this nicely.
I have created a test case for this by duplicating the default test case for assets... I wonder if there's a nicer way to do that than to duplicate all of that code... I removed some of the test cases from it that didn't appear relevant... but there's still a lot. I'm happy to try to improve that with some pointers.