fix: nested stylesheets should have absolute URLs (#1533)
* Replace relative URLs with absolute URLs when stringifying stylesheets * Add test to show desired behavior for imported stylesheets from seperate directory * Rename `absoluteToStylesheet` to `absolutifyURLs` and call it once after stringifying imported stylesheet * Don't create the intermediary array of the spread operator * Formalize that `stringifyRule` should expect a sheet href * Ensure a <style> element can also import and gets it's url absolutized * Handle case where non imported stylesheet has relative urls that need to be absolutified * Clarify in test files where jpegs are expected to appear in absolutified urls * Move absolutifyURLs call for import rules out of trycatch * Add a benchmarking test for stringifyStylesheet * Avoid the duplication on how to fall back --------- Co-authored-by: Eoghan Murray <eoghan@getthere.ie> Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"test:watch": "vitest watch",
|
||||
"retest:update": "vitest run --update",
|
||||
"test:update": "yarn build && vitest run --update",
|
||||
"bench": "vite build && vitest bench",
|
||||
"dev": "vite build --watch",
|
||||
"build": "yarn turbo prepublish -F rrweb-snapshot",
|
||||
"check-types": "tsc --noEmit",
|
||||
|
||||
Reference in New Issue
Block a user