Skip to content

Conversation

Copy link

Copilot AI commented Jan 27, 2026

Aliases pointing to @rubygems/* paths were left unresolved, breaking imports like:

config.proscenium.aliases = {
  'lexxy-variables' => '@rubygems/lexxy/app/assets/stylesheets/lexxy-variables.css'
}

Changes

@rubygems/ handler*: Re-resolve gem metadata when an aliased path is also a @rubygems/* path. Previously, gem name and path from the original import were used even after alias substitution.

General handler: Delegate to @rubygems/* handler via build.Resolve() when a bare module alias targets a @rubygems/* path. This ensures proper processing through the rubygems resolution pipeline including CSS-from-JS detection.

Both scenarios now correctly resolve the target path through the full resolution chain.

Original prompt

This section details on the original issue you should resolve

<issue_title>Alias to a @rubygems/* path is not resolved</issue_title>
<issue_description>When an alias is defined that points to a @rubygems/* path, the resulting path is not resolved. It seems to be left as is.

{
'lexxy-variables.css' => '@rubygems/lexxy/app/assets/stylesheets/lexxy-variables.css'
}

The above will resolve lexxy-variables.css to @rubygems/lexxy/app/assets/stylesheets/lexxy-variables.css.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 27, 2026 13:25
- Added logic to re-resolve gems after alias application in @rubygems handler
- Added delegation to @rubygems handler when bare module alias points to @rubygems path
- Added test case for bare module aliased to @rubygems/* path

Co-authored-by: joelmoss <4614+joelmoss@users.noreply.github.com>
Co-authored-by: joelmoss <4614+joelmoss@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix alias resolution for @rubygems paths Fix alias resolution for @rubygems/* paths Jan 27, 2026
Copilot AI requested a review from joelmoss January 27, 2026 13:31
@joelmoss joelmoss closed this Jan 27, 2026
@joelmoss joelmoss deleted the copilot/fix-alias-resolution-issue branch January 29, 2026 17:44
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.

Alias to a @rubygems/* path is not resolved

2 participants