Skip to content

Conversation

@LouisLau-art
Copy link

Closes #189

This PR adds support for transforming path aliases in non-TS files such as .css, .scss, .svg, .png, etc.

Changes

  • Updated resolveModuleName to check failedLookupLocations when TS fails to resolve a module.
  • If the module name matches a path alias and the corresponding file exists (after removing TS-specific extensions like .ts, .tsx), it is now correctly transformed to a relative path.
  • Added a test case in the general project to verify .css file transformation.

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.

Feature Request: Support non ts/tsx files like .css, .scss, .svg, .png, etc

1 participant