Repository navigation
Conversation
…2.0, TanStack, and Astro
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds official support for SolidJS 2.0 (while retaining full backward compatibility with Solid 1.x), modernizes our build and package exports for modern bundlers, and introduces an optional Vite plugin for instant dev-server performance.
It also addresses the performance goals discussed in #25 and explored by @aminya in #28 (eliminating client-side
innerHTMLoverhead and resolving bundler compilation lag). Instead of emitting 35,000+ individual precompiled component files to npm (which bloats package size and install times), we achieve high runtime performance and instant dev startup while preserving the library's existing clean API (import { IconName } from "solid-icons/<pack>").Key Changes
SolidJS 2.0 & Universal Runtime
IconTemplateto cleanly support Solid 2.0's reactive prop spreading and signal getters, while maintaining identical behavior in Solid 1.x.cloneNode), avoiding repeated HTML parsing while keeping SSR hydration straightforward.Modern Package Exports
package.json(".","./lib","./vite","./*") withsolid,import,types, anddefaultconditions, ensuring seamless resolution in Vite, Astro, and modern TypeScript (moduleResolution: "bundler"/"node16").Vite Optimizer Plugin (
solid-icons/vite)import { FaSolidHeart } from "solid-icons/fa") and resolves only the requested icons on the fly.vite dev, resulting in near-instant cold starts without requiring users to switch to individual file import paths.Ionicons SVGO Stroke Fix
NORMALIZE_PACK.IOtopreserveStrokeConfigin our SVGO optimization pipeline. This preventsremoveAttributesBySelectorandremoveUselessStrokeAndFillfrom accidentally strippingstroke-widthandstroke-linejoinfrom outline icons.Multi-Version E2E Test Suite
devandbuild)devandbuild)devandbuild)Usage Example
Standard usage remains unchanged:
To enable the Vite optimization in dev: