# Heroicons v1 to v2 migration script This script: 1. Upgrades your heroicons library to the latest version (detecting if you're using `heroicons/react` or `heroicons/vue` and `yarn` or `npm`) 2. Upgrades your import statements (from `@heroicons/${framework}/{solid|outline}` to `@heroicons/${framework}/20/{solid|outline}`) 3. Upgrades your icon names Thanks to [@steveoh](https://github.com/steveoh) & [@ryanburns23](https://github.com/ryanburns23) for creating the initial list of changes in https://github.com/tailwindlabs/heroicons/issues/750 and to @PicchiKevin for the initial version of this script. ---- # Run ```bash curl https://gist.githubusercontent.com/christiangenco/470a99f4823ee81f2b22bad83119f599/raw/migrateHeroicons.js | bash ``` If you're running it on Linux you might have to replace `sed -i '' -e` by `sed -i` in the `gsub` function. The script will avoid replacing strings in hidden folders (such as .git) but also `node_modules/` and the `migrateHeroicons.js` file if you download it. Happy with the script? Come say hi on Twitter [@KevinPicchi](https://twitter.com/KevinPicchi) / [@cgenco](https://twitter.com/cgenco)