SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.83k stars 94 forks source link

Properly resolve relative paths in CSS imports #527

Closed MatthewCash closed 4 months ago

MatthewCash commented 4 months ago

Currently, WebCord cannot resolve relative imports because it simply constructs a new URL() with the relative URL which will fail.

This change passes context about the current file to parseImports and fetchOrRead to prepend the previous URL's directory name if creating a URL fails.

SpacingBat3 commented 4 months ago

You don't have to force-push PR on changes to have a specific history, in fact it might be better to commit on top of the another. As long as things are around single thing to be implemented, I can always squash your commits later, and having the history of changes done to this PR is for sure useful if we consider to go back to how things were before (isn't that main purpose of git?)