git clone https://github.com/getsentry/platformicons.git
cd platformicons
yarn install
yarn buildRequirements: Node 20+ and Yarn 1.x (managed via Volta).
-
Add SVG files to both directories:
svg/<icon-name>.svg— small version (solid background for readability at small sizes)svg_80x80/<icon-name>.svg— large version (transparent background, 80x80px)
Both directories must have matching filenames — the build will fail if they don't.
-
Add the platform mapping in
src/platformIcon.tsxinside thePLATFORM_TO_ICONobject. Keep entries in alphabetical order:export const PLATFORM_TO_ICON = { // ... "python-newframework": "newframework", // ... };
The key is the platform identifier (e.g.
"python-newframework"), and the value is the SVG filename without the extension (e.g."newframework"). -
Regenerate the icon imports:
yarn generate
This runs
scripts/generate-icons.js, which reads both SVG directories and writessrc/icons.generated.ts. Do not edit that file by hand. -
Verify the build:
yarn build
yarn build does three things:
- Runs
scripts/generate-icons.jsto create static imports for all SVGs insrc/icons.generated.ts - Compiles TypeScript to CommonJS (
build/) - Compiles TypeScript to ESM (
esmbuild/)
- Fork the repo and create a branch
- Make your changes
- Run
yarn buildto verify everything compiles - Open a pull request — do not bump the version in
package.json, that's handled automatically during release