Migration to v2
Nuxt Migration
Upgrade @solar-icons/nuxt to v2.
Try the codemod first
The V2 codemod updates the deterministic Nuxt module configuration and reports legacy import patterns that need manual work. Review its preview before making the changes below.
Module config
Before:
solarIcons: {
prefix: 'Solar'
}After:
solarIcons: {
namePrefix: 'Solar'
}Auto-import names
Auto-imported components include the style suffix:
Before: <SolarHome />
After: <SolarHomeBoldIcon />
Scoped context
useSolar() must be called inside a <SolarProvider> tree. There is no global context.
Category and namespace imports removed
Before:
import * as solar from '#solar-icons/category'
// <solar.Arrows.ArrowDown :size="32" weight="BoldDuotone" />#solar-icons/category and the solar.* namespace no longer exist. Import icons individually.
Vue migration
The Nuxt module wraps @solar-icons/vue. See the Vue migration guide for component API changes.
How is this guide?
Last updated on