Skip to content

fix(heroicons): return early if file not found - #6868

Closed
kevinschweikert wants to merge 1 commit into
phoenixframework:mainfrom
kevinschweikert:fix/heroicons-path-not-found
Closed

kevinschweikert wants to merge 1 commit into
phoenixframework:mainfrom
kevinschweikert:fix/heroicons-path-not-found

Conversation

@kevinschweikert

Copy link
Copy Markdown
Contributor

While working on a fix for aptinio/canonical_tailwind#11 i discovered that canonical_tailwind asks the each plugin for each class if it is managed by it. So the heroicons plugin also received a request for "3px" for an arbitrary class like "p-[3px]" and the call to fs.readFileSync errored with path must be a string or a file descriptor. This fix just introduces an early return when the path is not known.

@SteffenDE

Copy link
Copy Markdown
Member

Can that be fixed in canonical_tailwind instead? It seems wrong to pass a class that doesn't match to a plugin that explicitly uses matchComponents to only look for hero-; I'm not against merging this change, but it feels like handling it in the wrong place, so if it can be fixed there, that's what I would prefer.

@aptinio

aptinio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Fixed upstream in tailwindlabs/tailwindcss#20052, released in 4.3.1.

@SteffenDE

Copy link
Copy Markdown
Member

Thanks for checking!

@SteffenDE SteffenDE closed this Oct 6, 2026
@kevinschweikert
kevinschweikert deleted the fix/heroicons-path-not-found branch October 6, 2026 06:08
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.

3 participants