UNPKG

react-lazy-svg

Version:

react-lazy-svg is a simple way to use SVGs with the performance benefits of a sprite-sheet and svg css styling possibilities. Without bloating the bundle. It automatically creates a sprite-sheet for all used SVGs on the client but also provides the option

88 lines (87 loc) 2.63 kB
{ "name": "react-lazy-svg", "version": "3.0.0", "license": "MIT", "keywords": [ "react", "svg", "spritesheet", "sprite", "sprites", "icons", "ssr", "typescript", "react-component", "critical-svg" ], "repository": { "url": "https://github.com/kaoDev/react-lazy-svg" }, "author": { "name": "Kalle Ott", "url": "https://github.com/kaoDev/" }, "description": "react-lazy-svg is a simple way to use SVGs with the performance benefits of a sprite-sheet and svg css styling possibilities. Without bloating the bundle. It automatically creates a sprite-sheet for all used SVGs on the client but also provides the option to inject the critical SVGs for the server side rendered html.", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { "cleanDist": "rm -rf ./dist", "createDeclarations": "tsc -d --jsx react --emitDeclarationOnly --esModuleInterop --downlevelIteration --outDir dist && rm dist/constants.d.ts", "createBundles": "rollup -c", "build": "yarn cleanDist && yarn createBundles && yarn createDeclarations", "publishVersion": "yarn test && yarn build && yarn lint && yarn publish", "test": "jest", "lint": "yarn eslint src/**/*", "prepare": "husky install" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" }, "husky": { "hooks": { "pre-commit": "yarn lint" } }, "prettier": { "printWidth": 80, "semi": true, "singleQuote": true, "trailingComma": "all", "proseWrap": "always" }, "devDependencies": { "@babel/preset-typescript": "^7.18.6", "@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-multi-entry": "^4.1.0", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@types/jest": "^28.1.4", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.30.5", "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-react": "^7.30.1", "eslint-plugin-react-hooks": "^4.6.0", "husky": "^8.0.1", "jest": "^28.1.2", "jest-environment-jsdom": "^28.1.2", "prettier": "^2.7.1", "react": "^18.2.0", "react-dom": "^18.2.0", "rollup": "^2.75.7", "rollup-plugin-filesize": "^9.1.2", "rollup-plugin-typescript2": "^0.32.1", "ts-jest": "^28.0.5", "tslib": "^2.4.0", "typescript": "^4.7.4", "w3c-xmlserializer": "^3.0.0" }, "dependencies": {} }