Skip to content

Conversation

@Timeless0911
Copy link
Contributor

Summary

closes: #41

We add builtin resolve.extensionAlias to align with the TypeScript specific behavior: if the extension is ".js" or ".jsx", try replacing it with ".ts" or ".tsx"

resolve: {
  extensionAlias: {
    '.js': ['.ts', '.tsx', '.js', '.jsx'],
    '.jsx': ['.tsx', '.jsx'],
    '.mjs': ['.mts', '.mjs'],
    '.cjs': ['.cts', '.cjs'],
  },
},

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Timeless0911 Timeless0911 force-pushed the feat/default-extension-alias branch from d9099b3 to a3f691a Compare August 26, 2024 12:32
@fi3ework fi3ework merged commit 3da07cf into main Aug 26, 2024
@fi3ework fi3ework deleted the feat/default-extension-alias branch August 26, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support default extension alias

3 participants