refactor: code cleanup and support for css files in manifest #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems css files do not get processed at ALL.
So I did a code cleanup and I had it support css files by collecting any found in the graph/tree and any in module ID's. However none may be in the graph, and I found something is manipulating the CSS assets so the filenames change.
In my case I have a generated css asset but a moduleId reference in a js file to
tailwind.css
.Since there is a relational disconnect I did the best thing I could and collected all found css files and added them to any export that was found to have a css file in its moduleId list.
This works well enough for now to ensure its added to the manifest for my purposes.
If anyone knows how to do better, I welcome feedback b/c I couldn't find the data in the vite graph data.