Files
rrweb/packages/rrweb-snapshot/package.json
Jeff Nguyen d350da8552 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>
2024-07-25 16:25:00 +02:00

72 lines
1.9 KiB
JSON

{
"name": "rrweb-snapshot",
"version": "2.0.0-alpha.16",
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
"scripts": {
"prepare": "npm run prepack",
"prepack": "npm run build",
"retest": "vitest run",
"test": "yarn build && vitest run",
"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",
"prepublish": "yarn check-types && vite build",
"lint": "yarn eslint src"
},
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/rrweb-io/rrweb.git"
},
"keywords": [
"rrweb",
"snapshot",
"DOM"
],
"main": "./dist/rrweb-snapshot.umd.cjs",
"module": "./dist/rrweb-snapshot.js",
"unpkg": "./dist/rrweb-snapshot.umd.cjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/rrweb-snapshot.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/rrweb-snapshot.umd.cjs"
}
}
},
"files": [
"dist",
"package.json"
],
"author": "yanzhen@smartx.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/rrweb-io/rrweb/issues"
},
"homepage": "https://github.com/rrweb-io/rrweb/tree/master/packages/rrweb-snapshot#readme",
"devDependencies": {
"@types/jsdom": "^20.0.0",
"@types/node": "^18.15.11",
"@types/puppeteer": "^5.4.4",
"puppeteer": "^17.1.3",
"ts-node": "^7.0.1",
"tslib": "^1.9.3",
"typescript": "^5.4.5",
"vite": "^5.3.1",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0"
},
"dependencies": {
"postcss": "^8.4.38"
}
}