Skip to content

feat: Add Preact (iconoir-preact) - #610

Open
AttAditya wants to merge 9 commits into
iconoir-icons:mainfrom
AttAditya:feat/preact
Open

feat: Add Preact (iconoir-preact)#610
AttAditya wants to merge 9 commits into
iconoir-icons:mainfrom
AttAditya:feat/preact

Conversation

@AttAditya

@AttAditya AttAditya commented May 10, 2026

Copy link
Copy Markdown

Summary

This version of the Preact Builds is stable, however it lacks the context and provider functionality. There are imports for the same but they don't really match the exact behaviour as React Builds yet.

  • This pull request introduces builds that support using Iconoir with Preact
  • The package is setup for iconoir-preact

Implementation

  • Added target build for preact in bin/build/target
  • Plugged in the target for preact in build/index.js
    • Title: Preact Library
    • Path: packages/iconoir-preact
  • Created build file containing the exported build function
    • setupDist: Sets up the dist directory for the build process.
    • addRootFiles: Adds necessary root files (like package.json, README.md, etc.) to the dist directory.
    • buildIcons: Builds the icon assets for the project.
    • addDefaultVariants: Adds default variant imports for the icons.
    • addContexts: Adds context providers for the icons.
    • build [exported]: Executes the build process, which includes setting up the dist directory, adding root files, building icons, adding default variants, and adding contexts.
  • Added templates/ files for file and code creation with help of function, code and file templates and presets.

Motivation

I wanted to use Iconoir with one of my projects, however it turned out that it wasn't being compatible with Preact. So I just added the functionality enough (at the time of writing this) that icons can be used without having much problems.

Testing

  • Tested on an actual workspace
  • Successful builds
  • Icon imports showing
  • Icon props working
  • Type definitions working

@AttAditya AttAditya changed the title feat: Preact Build feat: Add Preact (iconoir-preact) Jun 6, 2026
@AttAditya

Copy link
Copy Markdown
Author

Hi! @lucaburgio

This is a PR for Iconoir-Preact! I have created this a long time and have been using my custom fork for it for months now!

image

I would love if I can get it accessible to community officially as Iconoir-Preact! Please let me know if there are any changes or updates you want!

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant